Browse Source

Fix PlacementMode property order

robloo 2 years ago
parent
commit
8fa365c08e
2 changed files with 11 additions and 15 deletions
  1. 5 9
      src/Avalonia.Controls/ContextMenu.cs
  2. 6 6
      src/Avalonia.Controls/Primitives/Popup.cs

+ 5 - 9
src/Avalonia.Controls/ContextMenu.cs

@@ -54,21 +54,17 @@ namespace Avalonia.Controls
         public static readonly StyledProperty<PopupGravity> PlacementGravityProperty =
             Popup.PlacementGravityProperty.AddOwner<ContextMenu>();
 
-        /// <summary>
-        /// Defines the <see cref="PlacementMode"/> property.
-        /// </summary>
-        [Obsolete("Use the Placement property instead.")]
-        public static readonly StyledProperty<PlacementMode> PlacementModeProperty = PlacementProperty;
-
-#pragma warning disable AVP1013 // AvaloniaProperty owners should not be added superfluously
-
         /// <summary>
         /// Defines the <see cref="Placement"/> property.
         /// </summary>
         public static readonly StyledProperty<PlacementMode> PlacementProperty =
             Popup.PlacementProperty.AddOwner<ContextMenu>();
 
-#pragma warning restore AVP1013 // AvaloniaProperty owners should not be added superfluously
+        /// <summary>
+        /// Defines the <see cref="PlacementMode"/> property.
+        /// </summary>
+        [Obsolete("Use the Placement property instead.")]
+        public static readonly StyledProperty<PlacementMode> PlacementModeProperty = PlacementProperty;
 
         /// <summary>
         /// Defines the <see cref="PlacementRect"/> property.

+ 6 - 6
src/Avalonia.Controls/Primitives/Popup.cs

@@ -65,18 +65,18 @@ namespace Avalonia.Controls.Primitives
         public static readonly StyledProperty<PopupGravity> PlacementGravityProperty =
             AvaloniaProperty.Register<Popup, PopupGravity>(nameof(PlacementGravity));
 
-        /// <summary>
-        /// Defines the <see cref="PlacementMode"/> property.
-        /// </summary>
-        [Obsolete("Use the Placement property instead.")]
-        public static readonly StyledProperty<PlacementMode> PlacementModeProperty = PlacementProperty;
-
         /// <summary>
         /// Defines the <see cref="Placement"/> property.
         /// </summary>
         public static readonly StyledProperty<PlacementMode> PlacementProperty =
             AvaloniaProperty.Register<Popup, PlacementMode>(nameof(Placement), defaultValue: PlacementMode.Bottom);
 
+        /// <summary>
+        /// Defines the <see cref="PlacementMode"/> property.
+        /// </summary>
+        [Obsolete("Use the Placement property instead.")]
+        public static readonly StyledProperty<PlacementMode> PlacementModeProperty = PlacementProperty;
+
         /// <summary>
         /// Defines the <see cref="PlacementRect"/> property.
         /// </summary>