misc: remove unused close button field from ClosableTag.
This commit is contained in:
@@ -2,7 +2,6 @@ using System.Windows.Input;
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Controls.Metadata;
|
using Avalonia.Controls.Metadata;
|
||||||
using Avalonia.Controls.Primitives;
|
|
||||||
|
|
||||||
namespace Ursa.Controls;
|
namespace Ursa.Controls;
|
||||||
|
|
||||||
@@ -10,7 +9,6 @@ namespace Ursa.Controls;
|
|||||||
public class ClosableTag : ContentControl
|
public class ClosableTag : ContentControl
|
||||||
{
|
{
|
||||||
public const string PART_CloseButton = "PART_CloseButton";
|
public const string PART_CloseButton = "PART_CloseButton";
|
||||||
private Button? _closeButton;
|
|
||||||
|
|
||||||
public static readonly StyledProperty<ICommand?> CommandProperty = AvaloniaProperty.Register<ClosableTag, ICommand?>(
|
public static readonly StyledProperty<ICommand?> CommandProperty = AvaloniaProperty.Register<ClosableTag, ICommand?>(
|
||||||
nameof(Command));
|
nameof(Command));
|
||||||
@@ -20,10 +18,4 @@ public class ClosableTag : ContentControl
|
|||||||
get => GetValue(CommandProperty);
|
get => GetValue(CommandProperty);
|
||||||
set => SetValue(CommandProperty, value);
|
set => SetValue(CommandProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
|
|
||||||
{
|
|
||||||
base.OnApplyTemplate(e);
|
|
||||||
_closeButton = e.NameScope.Find<Button>(PART_CloseButton);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user