Browse Source
Merge pull request #8114 from wieslawsoltes/fixes/PropertyNames
Fix property registrations
pull/8117/head
Max Katz
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with
20 additions and
20 deletions
-
src/Avalonia.Base/Layout/UniformGridLayout.cs
-
src/Avalonia.Base/Media/ConicGradientBrush.cs
-
src/Avalonia.Controls/ContextMenu.cs
-
src/Avalonia.Controls/DockPanel.cs
-
src/Avalonia.Controls/MaskedTextBox.cs
-
src/Avalonia.Controls/Presenters/TextPresenter.cs
-
src/Avalonia.Controls/Primitives/Popup.cs
-
src/Avalonia.Controls/Primitives/SelectingItemsControl.cs
-
src/Avalonia.Controls/Primitives/Track.cs
-
src/Avalonia.Controls/Slider.cs
-
src/Avalonia.Controls/SplitView.cs
-
src/Avalonia.Controls/TextBox.cs
|
|
|
@ -116,7 +116,7 @@ namespace Avalonia.Layout |
|
|
|
/// Defines the <see cref="MaximumRowsOrColumnsProperty"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<int> MaximumRowsOrColumnsProperty = |
|
|
|
AvaloniaProperty.Register<UniformGridLayout, int>(nameof(MinItemWidth)); |
|
|
|
AvaloniaProperty.Register<UniformGridLayout, int>(nameof(MaximumRowsOrColumns)); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="Orientation"/> property.
|
|
|
|
|
|
|
|
@ -11,7 +11,7 @@ namespace Avalonia.Media |
|
|
|
/// Defines the <see cref="Center"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<RelativePoint> CenterProperty = |
|
|
|
AvaloniaProperty.Register<RadialGradientBrush, RelativePoint>( |
|
|
|
AvaloniaProperty.Register<ConicGradientBrush, RelativePoint>( |
|
|
|
nameof(Center), |
|
|
|
RelativePoint.Center); |
|
|
|
|
|
|
|
@ -19,7 +19,7 @@ namespace Avalonia.Media |
|
|
|
/// Defines the <see cref="Angle"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<double> AngleProperty = |
|
|
|
AvaloniaProperty.Register<RadialGradientBrush, double>( |
|
|
|
AvaloniaProperty.Register<ConicGradientBrush, double>( |
|
|
|
nameof(Angle), |
|
|
|
0); |
|
|
|
|
|
|
|
|
|
|
|
@ -63,7 +63,7 @@ namespace Avalonia.Controls |
|
|
|
/// Defines the <see cref="PlacementRect"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<Rect?> PlacementRectProperty = |
|
|
|
AvaloniaProperty.Register<Popup, Rect?>(nameof(PlacementRect)); |
|
|
|
Popup.PlacementRectProperty.AddOwner<ContextMenu>(); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="WindowManagerAddShadowHint"/> property.
|
|
|
|
|
|
|
|
@ -34,7 +34,7 @@ namespace Avalonia.Controls |
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<bool> LastChildFillProperty = |
|
|
|
AvaloniaProperty.Register<DockPanel, bool>( |
|
|
|
nameof(LastChildFillProperty), |
|
|
|
nameof(LastChildFill), |
|
|
|
defaultValue: true); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
@ -32,7 +32,7 @@ namespace Avalonia.Controls |
|
|
|
AvaloniaProperty.Register<MaskedTextBox, string?>(nameof(Mask), string.Empty); |
|
|
|
|
|
|
|
public static new readonly StyledProperty<char> PasswordCharProperty = |
|
|
|
AvaloniaProperty.Register<TextBox, char>(nameof(PasswordChar), '\0'); |
|
|
|
AvaloniaProperty.Register<MaskedTextBox, char>(nameof(PasswordChar), '\0'); |
|
|
|
|
|
|
|
public static readonly StyledProperty<char> PromptCharProperty = |
|
|
|
AvaloniaProperty.Register<MaskedTextBox, char>(nameof(PromptChar), '_'); |
|
|
|
|
|
|
|
@ -26,13 +26,13 @@ namespace Avalonia.Controls.Presenters |
|
|
|
AvaloniaProperty.Register<TextPresenter, char>(nameof(PasswordChar)); |
|
|
|
|
|
|
|
public static readonly StyledProperty<IBrush?> SelectionBrushProperty = |
|
|
|
AvaloniaProperty.Register<TextPresenter, IBrush?>(nameof(SelectionBrushProperty)); |
|
|
|
AvaloniaProperty.Register<TextPresenter, IBrush?>(nameof(SelectionBrush)); |
|
|
|
|
|
|
|
public static readonly StyledProperty<IBrush?> SelectionForegroundBrushProperty = |
|
|
|
AvaloniaProperty.Register<TextPresenter, IBrush?>(nameof(SelectionForegroundBrushProperty)); |
|
|
|
AvaloniaProperty.Register<TextPresenter, IBrush?>(nameof(SelectionForegroundBrush)); |
|
|
|
|
|
|
|
public static readonly StyledProperty<IBrush?> CaretBrushProperty = |
|
|
|
AvaloniaProperty.Register<TextPresenter, IBrush?>(nameof(CaretBrushProperty)); |
|
|
|
AvaloniaProperty.Register<TextPresenter, IBrush?>(nameof(CaretBrush)); |
|
|
|
|
|
|
|
public static readonly DirectProperty<TextPresenter, int> SelectionStartProperty = |
|
|
|
TextBox.SelectionStartProperty.AddOwner<TextPresenter>( |
|
|
|
|
|
|
|
@ -27,7 +27,7 @@ namespace Avalonia.Controls.Primitives |
|
|
|
#pragma warning restore CS0612 // Type or member is obsolete
|
|
|
|
{ |
|
|
|
public static readonly StyledProperty<bool> WindowManagerAddShadowHintProperty = |
|
|
|
AvaloniaProperty.Register<PopupRoot, bool>(nameof(WindowManagerAddShadowHint), false); |
|
|
|
AvaloniaProperty.Register<Popup, bool>(nameof(WindowManagerAddShadowHint), false); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="Child"/> property.
|
|
|
|
|
|
|
|
@ -94,7 +94,7 @@ namespace Avalonia.Controls.Primitives |
|
|
|
/// Defines the <see cref="IsTextSearchEnabled"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<bool> IsTextSearchEnabledProperty = |
|
|
|
AvaloniaProperty.Register<ItemsControl, bool>(nameof(IsTextSearchEnabled), false); |
|
|
|
AvaloniaProperty.Register<SelectingItemsControl, bool>(nameof(IsTextSearchEnabled), false); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Event that should be raised by items that implement <see cref="ISelectable"/> to
|
|
|
|
|
|
|
|
@ -44,7 +44,7 @@ namespace Avalonia.Controls.Primitives |
|
|
|
AvaloniaProperty.Register<Track, bool>(nameof(IsDirectionReversed)); |
|
|
|
|
|
|
|
public static readonly StyledProperty<bool> IgnoreThumbDragProperty = |
|
|
|
AvaloniaProperty.Register<Track, bool>(nameof(IsThumbDragHandled)); |
|
|
|
AvaloniaProperty.Register<Track, bool>(nameof(IgnoreThumbDrag)); |
|
|
|
|
|
|
|
private double _minimum; |
|
|
|
private double _maximum = 100.0; |
|
|
|
@ -118,7 +118,7 @@ namespace Avalonia.Controls.Primitives |
|
|
|
set { SetValue(IsDirectionReversedProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
public bool IsThumbDragHandled |
|
|
|
public bool IgnoreThumbDrag |
|
|
|
{ |
|
|
|
get { return GetValue(IgnoreThumbDragProperty); } |
|
|
|
set { SetValue(IgnoreThumbDragProperty, value); } |
|
|
|
@ -442,7 +442,7 @@ namespace Avalonia.Controls.Primitives |
|
|
|
|
|
|
|
private void ThumbDragged(object? sender, VectorEventArgs e) |
|
|
|
{ |
|
|
|
if (IsThumbDragHandled) |
|
|
|
if (IgnoreThumbDrag) |
|
|
|
return; |
|
|
|
|
|
|
|
Value = MathUtilities.Clamp( |
|
|
|
|
|
|
|
@ -76,7 +76,7 @@ namespace Avalonia.Controls |
|
|
|
/// Defines the <see cref="TickPlacement"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<TickPlacement> TickPlacementProperty = |
|
|
|
AvaloniaProperty.Register<TickBar, TickPlacement>(nameof(TickPlacement), 0d); |
|
|
|
AvaloniaProperty.Register<Slider, TickPlacement>(nameof(TickPlacement), 0d); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="TicksProperty"/> property.
|
|
|
|
@ -197,7 +197,7 @@ namespace Avalonia.Controls |
|
|
|
|
|
|
|
if (_track != null) |
|
|
|
{ |
|
|
|
_track.IsThumbDragHandled = true; |
|
|
|
_track.IgnoreThumbDrag = true; |
|
|
|
} |
|
|
|
|
|
|
|
if (_decreaseButton != null) |
|
|
|
|
|
|
|
@ -138,7 +138,7 @@ namespace Avalonia.Controls |
|
|
|
/// Defines the <see cref="PaneTemplate"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<IDataTemplate> PaneTemplateProperty = |
|
|
|
AvaloniaProperty.Register<HeaderedContentControl, IDataTemplate>(nameof(PaneTemplate)); |
|
|
|
AvaloniaProperty.Register<SplitView, IDataTemplate>(nameof(PaneTemplate)); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="UseLightDismissOverlayMode"/> property
|
|
|
|
|
|
|
|
@ -55,13 +55,13 @@ namespace Avalonia.Controls |
|
|
|
AvaloniaProperty.Register<TextBox, char>(nameof(PasswordChar)); |
|
|
|
|
|
|
|
public static readonly StyledProperty<IBrush?> SelectionBrushProperty = |
|
|
|
AvaloniaProperty.Register<TextBox, IBrush?>(nameof(SelectionBrushProperty)); |
|
|
|
AvaloniaProperty.Register<TextBox, IBrush?>(nameof(SelectionBrush)); |
|
|
|
|
|
|
|
public static readonly StyledProperty<IBrush?> SelectionForegroundBrushProperty = |
|
|
|
AvaloniaProperty.Register<TextBox, IBrush?>(nameof(SelectionForegroundBrushProperty)); |
|
|
|
AvaloniaProperty.Register<TextBox, IBrush?>(nameof(SelectionForegroundBrush)); |
|
|
|
|
|
|
|
public static readonly StyledProperty<IBrush?> CaretBrushProperty = |
|
|
|
AvaloniaProperty.Register<TextBox, IBrush?>(nameof(CaretBrushProperty)); |
|
|
|
AvaloniaProperty.Register<TextBox, IBrush?>(nameof(CaretBrush)); |
|
|
|
|
|
|
|
public static readonly DirectProperty<TextBox, int> SelectionStartProperty = |
|
|
|
AvaloniaProperty.RegisterDirect<TextBox, int>( |
|
|
|
|