Pārlūkot izejas kodu

Fix PlacementMode property order

robloo 2 gadi atpakaļ
vecāks
revīzija
8fa365c08e

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

@@ -54,21 +54,17 @@ namespace Avalonia.Controls
         public static readonly StyledProperty<PopupGravity> PlacementGravityProperty =
         public static readonly StyledProperty<PopupGravity> PlacementGravityProperty =
             Popup.PlacementGravityProperty.AddOwner<ContextMenu>();
             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>
         /// <summary>
         /// Defines the <see cref="Placement"/> property.
         /// Defines the <see cref="Placement"/> property.
         /// </summary>
         /// </summary>
         public static readonly StyledProperty<PlacementMode> PlacementProperty =
         public static readonly StyledProperty<PlacementMode> PlacementProperty =
             Popup.PlacementProperty.AddOwner<ContextMenu>();
             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>
         /// <summary>
         /// Defines the <see cref="PlacementRect"/> property.
         /// 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 =
         public static readonly StyledProperty<PopupGravity> PlacementGravityProperty =
             AvaloniaProperty.Register<Popup, PopupGravity>(nameof(PlacementGravity));
             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>
         /// <summary>
         /// Defines the <see cref="Placement"/> property.
         /// Defines the <see cref="Placement"/> property.
         /// </summary>
         /// </summary>
         public static readonly StyledProperty<PlacementMode> PlacementProperty =
         public static readonly StyledProperty<PlacementMode> PlacementProperty =
             AvaloniaProperty.Register<Popup, PlacementMode>(nameof(Placement), defaultValue: PlacementMode.Bottom);
             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>
         /// <summary>
         /// Defines the <see cref="PlacementRect"/> property.
         /// Defines the <see cref="PlacementRect"/> property.
         /// </summary>
         /// </summary>