diff options
Diffstat (limited to 'UVtools.WPF/Controls/ButtonWithIcon.cs')
-rw-r--r-- | UVtools.WPF/Controls/ButtonWithIcon.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/UVtools.WPF/Controls/ButtonWithIcon.cs b/UVtools.WPF/Controls/ButtonWithIcon.cs index 11edc87..576df3a 100644 --- a/UVtools.WPF/Controls/ButtonWithIcon.cs +++ b/UVtools.WPF/Controls/ButtonWithIcon.cs @@ -11,6 +11,7 @@ using Avalonia.Controls; using Avalonia.Layout; using Avalonia.Styling; using Avalonia.Threading; +using JetBrains.Annotations; namespace UVtools.WPF.Controls; @@ -44,9 +45,10 @@ public class ButtonWithIcon : Button, IStyleable set => SetValue(IconPlacementProperty, value); } - public static readonly StyledProperty<string> IconProperty = - AvaloniaProperty.Register<ButtonWithIcon, string>(nameof(Icon)); + public static readonly StyledProperty<string?> IconProperty = + AvaloniaProperty.Register<ButtonWithIcon, string?>(nameof(Icon)); + [CanBeNull] public string Icon { get => GetValue(IconProperty); |