From 63e65e47b972713e82e5bd3f193560ea8df09e8c 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/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs index aebdcf93..4191c424 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs +++ b/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/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml index b0ddf12d..95e8b0f5 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml @@ -399,7 +399,7 @@ - + @@ -412,7 +412,7 @@ - +