Browse Source

Re-added an obsolete DropDown control.

To provide backwards compatibility for the moment.
Steven Kirk 6 years ago
parent
commit
18f2e4e6be
1 changed files with 28 additions and 0 deletions
  1. 28 0
      src/Avalonia.Controls/DropDown.cs

+ 28 - 0
src/Avalonia.Controls/DropDown.cs

@@ -0,0 +1,28 @@
+using System;
+using Avalonia.Logging;
+using Avalonia.Styling;
+
+namespace Avalonia.Controls
+{
+    [Obsolete("Use ComboBox")]
+    public class DropDown : ComboBox, IStyleable
+    {
+        public DropDown()
+        {
+            Logger.Warning(LogArea.Control, this, "DropDown is deprecated: Use ComboBox");
+        }
+
+        Type IStyleable.StyleKey => typeof(ComboBox);
+    }
+
+    [Obsolete("Use ComboBoxItem")]
+    public class DropDownItem : ComboBoxItem, IStyleable
+    {
+        public DropDownItem()
+        {
+            Logger.Warning(LogArea.Control, this, "DropDownItem is deprecated: Use ComboBoxItem");
+        }
+
+        Type IStyleable.StyleKey => typeof(ComboBoxItem);
+    }
+}