fixed #487
This commit is contained in:
1 parent
4ef70ba91d
commit
594e86730d
2 files changed
+13
-4
No files matched your search
@@ -29,8 +29,8 @@ namespace HandyControl.Controls
|
||||
|
||||
public PropertyGrid()
|
||||
{
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.SortByCategory, SortByCategory));
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.SortByName, SortByName));
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.SortByCategory, SortByCategory, (s, e) => e.CanExecute = ShowSortButton));
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.SortByName, SortByName, (s, e)=> e.CanExecute = ShowSortButton));
|
||||
}
|
||||
|
||||
public virtual PropertyResolver PropertyResolver { get; } = new PropertyResolver();
|
||||
@@ -93,6 +93,15 @@ namespace HandyControl.Controls
|
||||
set => SetValue(MinTitleWidthProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty ShowSortButtonProperty = DependencyProperty.Register(
|
||||
"ShowSortButton", typeof(bool), typeof(PropertyGrid), new PropertyMetadata(ValueBoxes.TrueBox));
|
||||
|
||||
public bool ShowSortButton
|
||||
{
|
||||
get => (bool) GetValue(ShowSortButtonProperty);
|
||||
set => SetValue(ShowSortButtonProperty, value);
|
||||
}
|
||||
|
||||
public override void OnApplyTemplate()
|
||||
{
|
||||
if (_searchBar != null)
|
||||
|
||||
Reference in new issue
Block a user