From 39fe06df6df70be9139be87496680b1e5eae89d6 Mon Sep 17 00:00:00 2001 From: brianlagunas_cp Date: Sat, 7 Jan 2012 04:25:30 +0000 Subject: [PATCH] PropertyGrid: added ShowSortOptions and ShowSearchBox properties that will allow you to control the visibility of the Categorize/Alpha sort optiosna dnt he search text box. --- .../Implementation/PropertyGrid.cs | 22 +++++++++++++++++++ .../PropertyGrid/Themes/Generic.xaml | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs b/Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs index aebdcf93..4191c424 100644 --- a/Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs +++ b/Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs @@ -297,6 +297,28 @@ namespace Microsoft.Windows.Controls.PropertyGrid #endregion //ShowAdvancedOptions + #region ShowSearchBox + + public static readonly DependencyProperty ShowSearchBoxProperty = DependencyProperty.Register("ShowSearchBox", typeof(bool), typeof(PropertyGrid), new UIPropertyMetadata(true)); + public bool ShowSearchBox + { + get { return (bool)GetValue(ShowSearchBoxProperty); } + set { SetValue(ShowSearchBoxProperty, value); } + } + + #endregion //ShowSearchBox + + #region ShowSortOptions + + public static readonly DependencyProperty ShowSortOptionsProperty = DependencyProperty.Register("ShowSortOptions", typeof(bool), typeof(PropertyGrid), new UIPropertyMetadata(true)); + public bool ShowSortOptions + { + get { return (bool)GetValue(ShowSortOptionsProperty); } + set { SetValue(ShowSortOptionsProperty, value); } + } + + #endregion //ShowSortOptions + #endregion //Properties #region Constructors diff --git a/Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml b/Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml index b0ddf12d..95e8b0f5 100644 --- a/Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml +++ b/Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml @@ -399,7 +399,7 @@ - + @@ -412,7 +412,7 @@ - +