Skip to content

Commit 204b4c1

Browse files
authored
Merge pull request #8114 from wieslawsoltes/fixes/PropertyNames
Fix property registrations
2 parents 28f8bf8 + 6e1d9ca commit 204b4c1

File tree

12 files changed

+20
-20
lines changed

12 files changed

+20
-20
lines changed

src/Avalonia.Base/Layout/UniformGridLayout.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public class UniformGridLayout : VirtualizingLayout, IFlowLayoutAlgorithmDelegat
116116
/// Defines the <see cref="MaximumRowsOrColumnsProperty"/> property.
117117
/// </summary>
118118
public static readonly StyledProperty<int> MaximumRowsOrColumnsProperty =
119-
AvaloniaProperty.Register<UniformGridLayout, int>(nameof(MinItemWidth));
119+
AvaloniaProperty.Register<UniformGridLayout, int>(nameof(MaximumRowsOrColumns));
120120

121121
/// <summary>
122122
/// Defines the <see cref="Orientation"/> property.

src/Avalonia.Base/Media/ConicGradientBrush.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ public sealed class ConicGradientBrush : GradientBrush, IConicGradientBrush
1111
/// Defines the <see cref="Center"/> property.
1212
/// </summary>
1313
public static readonly StyledProperty<RelativePoint> CenterProperty =
14-
AvaloniaProperty.Register<RadialGradientBrush, RelativePoint>(
14+
AvaloniaProperty.Register<ConicGradientBrush, RelativePoint>(
1515
nameof(Center),
1616
RelativePoint.Center);
1717

1818
/// <summary>
1919
/// Defines the <see cref="Angle"/> property.
2020
/// </summary>
2121
public static readonly StyledProperty<double> AngleProperty =
22-
AvaloniaProperty.Register<RadialGradientBrush, double>(
22+
AvaloniaProperty.Register<ConicGradientBrush, double>(
2323
nameof(Angle),
2424
0);
2525

src/Avalonia.Controls/ContextMenu.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public class ContextMenu : MenuBase, ISetterValue, IPopupHostProvider
6363
/// Defines the <see cref="PlacementRect"/> property.
6464
/// </summary>
6565
public static readonly StyledProperty<Rect?> PlacementRectProperty =
66-
AvaloniaProperty.Register<Popup, Rect?>(nameof(PlacementRect));
66+
Popup.PlacementRectProperty.AddOwner<ContextMenu>();
6767

6868
/// <summary>
6969
/// Defines the <see cref="WindowManagerAddShadowHint"/> property.

src/Avalonia.Controls/DockPanel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class DockPanel : Panel
3434
/// </summary>
3535
public static readonly StyledProperty<bool> LastChildFillProperty =
3636
AvaloniaProperty.Register<DockPanel, bool>(
37-
nameof(LastChildFillProperty),
37+
nameof(LastChildFill),
3838
defaultValue: true);
3939

4040
/// <summary>

src/Avalonia.Controls/MaskedTextBox.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class MaskedTextBox : TextBox, IStyleable
3232
AvaloniaProperty.Register<MaskedTextBox, string?>(nameof(Mask), string.Empty);
3333

3434
public static new readonly StyledProperty<char> PasswordCharProperty =
35-
AvaloniaProperty.Register<TextBox, char>(nameof(PasswordChar), '\0');
35+
AvaloniaProperty.Register<MaskedTextBox, char>(nameof(PasswordChar), '\0');
3636

3737
public static readonly StyledProperty<char> PromptCharProperty =
3838
AvaloniaProperty.Register<MaskedTextBox, char>(nameof(PromptChar), '_');

src/Avalonia.Controls/Presenters/TextPresenter.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ public class TextPresenter : Control
2626
AvaloniaProperty.Register<TextPresenter, char>(nameof(PasswordChar));
2727

2828
public static readonly StyledProperty<IBrush?> SelectionBrushProperty =
29-
AvaloniaProperty.Register<TextPresenter, IBrush?>(nameof(SelectionBrushProperty));
29+
AvaloniaProperty.Register<TextPresenter, IBrush?>(nameof(SelectionBrush));
3030

3131
public static readonly StyledProperty<IBrush?> SelectionForegroundBrushProperty =
32-
AvaloniaProperty.Register<TextPresenter, IBrush?>(nameof(SelectionForegroundBrushProperty));
32+
AvaloniaProperty.Register<TextPresenter, IBrush?>(nameof(SelectionForegroundBrush));
3333

3434
public static readonly StyledProperty<IBrush?> CaretBrushProperty =
35-
AvaloniaProperty.Register<TextPresenter, IBrush?>(nameof(CaretBrushProperty));
35+
AvaloniaProperty.Register<TextPresenter, IBrush?>(nameof(CaretBrush));
3636

3737
public static readonly DirectProperty<TextPresenter, int> SelectionStartProperty =
3838
TextBox.SelectionStartProperty.AddOwner<TextPresenter>(

src/Avalonia.Controls/Primitives/Popup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class Popup : Control, IVisualTreeHost, IPopupHostProvider
2727
#pragma warning restore CS0612 // Type or member is obsolete
2828
{
2929
public static readonly StyledProperty<bool> WindowManagerAddShadowHintProperty =
30-
AvaloniaProperty.Register<PopupRoot, bool>(nameof(WindowManagerAddShadowHint), false);
30+
AvaloniaProperty.Register<Popup, bool>(nameof(WindowManagerAddShadowHint), false);
3131

3232
/// <summary>
3333
/// Defines the <see cref="Child"/> property.

src/Avalonia.Controls/Primitives/SelectingItemsControl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public class SelectingItemsControl : ItemsControl
9494
/// Defines the <see cref="IsTextSearchEnabled"/> property.
9595
/// </summary>
9696
public static readonly StyledProperty<bool> IsTextSearchEnabledProperty =
97-
AvaloniaProperty.Register<ItemsControl, bool>(nameof(IsTextSearchEnabled), false);
97+
AvaloniaProperty.Register<SelectingItemsControl, bool>(nameof(IsTextSearchEnabled), false);
9898

9999
/// <summary>
100100
/// Event that should be raised by items that implement <see cref="ISelectable"/> to

src/Avalonia.Controls/Primitives/Track.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class Track : Control
4444
AvaloniaProperty.Register<Track, bool>(nameof(IsDirectionReversed));
4545

4646
public static readonly StyledProperty<bool> IgnoreThumbDragProperty =
47-
AvaloniaProperty.Register<Track, bool>(nameof(IsThumbDragHandled));
47+
AvaloniaProperty.Register<Track, bool>(nameof(IgnoreThumbDrag));
4848

4949
private double _minimum;
5050
private double _maximum = 100.0;
@@ -118,7 +118,7 @@ public bool IsDirectionReversed
118118
set { SetValue(IsDirectionReversedProperty, value); }
119119
}
120120

121-
public bool IsThumbDragHandled
121+
public bool IgnoreThumbDrag
122122
{
123123
get { return GetValue(IgnoreThumbDragProperty); }
124124
set { SetValue(IgnoreThumbDragProperty, value); }
@@ -442,7 +442,7 @@ private void ButtonChanged(AvaloniaPropertyChangedEventArgs e)
442442

443443
private void ThumbDragged(object? sender, VectorEventArgs e)
444444
{
445-
if (IsThumbDragHandled)
445+
if (IgnoreThumbDrag)
446446
return;
447447

448448
Value = MathUtilities.Clamp(

src/Avalonia.Controls/Slider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public class Slider : RangeBase
7676
/// Defines the <see cref="TickPlacement"/> property.
7777
/// </summary>
7878
public static readonly StyledProperty<TickPlacement> TickPlacementProperty =
79-
AvaloniaProperty.Register<TickBar, TickPlacement>(nameof(TickPlacement), 0d);
79+
AvaloniaProperty.Register<Slider, TickPlacement>(nameof(TickPlacement), 0d);
8080

8181
/// <summary>
8282
/// Defines the <see cref="TicksProperty"/> property.
@@ -197,7 +197,7 @@ protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
197197

198198
if (_track != null)
199199
{
200-
_track.IsThumbDragHandled = true;
200+
_track.IgnoreThumbDrag = true;
201201
}
202202

203203
if (_decreaseButton != null)

src/Avalonia.Controls/SplitView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Pseudo classes & combos
138138
/// Defines the <see cref="PaneTemplate"/> property.
139139
/// </summary>
140140
public static readonly StyledProperty<IDataTemplate> PaneTemplateProperty =
141-
AvaloniaProperty.Register<HeaderedContentControl, IDataTemplate>(nameof(PaneTemplate));
141+
AvaloniaProperty.Register<SplitView, IDataTemplate>(nameof(PaneTemplate));
142142

143143
/// <summary>
144144
/// Defines the <see cref="UseLightDismissOverlayMode"/> property

src/Avalonia.Controls/TextBox.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ public class TextBox : TemplatedControl, UndoRedoHelper<TextBox.UndoRedoState>.I
5555
AvaloniaProperty.Register<TextBox, char>(nameof(PasswordChar));
5656

5757
public static readonly StyledProperty<IBrush?> SelectionBrushProperty =
58-
AvaloniaProperty.Register<TextBox, IBrush?>(nameof(SelectionBrushProperty));
58+
AvaloniaProperty.Register<TextBox, IBrush?>(nameof(SelectionBrush));
5959

6060
public static readonly StyledProperty<IBrush?> SelectionForegroundBrushProperty =
61-
AvaloniaProperty.Register<TextBox, IBrush?>(nameof(SelectionForegroundBrushProperty));
61+
AvaloniaProperty.Register<TextBox, IBrush?>(nameof(SelectionForegroundBrush));
6262

6363
public static readonly StyledProperty<IBrush?> CaretBrushProperty =
64-
AvaloniaProperty.Register<TextBox, IBrush?>(nameof(CaretBrushProperty));
64+
AvaloniaProperty.Register<TextBox, IBrush?>(nameof(CaretBrush));
6565

6666
public static readonly DirectProperty<TextBox, int> SelectionStartProperty =
6767
AvaloniaProperty.RegisterDirect<TextBox, int>(

0 commit comments

Comments
 (0)