Browse Source

PropertyGrid: added FilterWatermark property which allows you to customize the watermark of the Filter textbox.

pull/1645/head
brianlagunas_cp 14 years ago
parent
commit
29ac63a65d
  1. 14
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs
  2. 2
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml

14
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs

@ -8,7 +8,6 @@ using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Input;
using Microsoft.Windows.Controls.PropertyGrid.Commands;
using System.Reflection;
namespace Microsoft.Windows.Controls.PropertyGrid
{
@ -91,6 +90,17 @@ namespace Microsoft.Windows.Controls.PropertyGrid
#endregion //Filter
#region FilterWatermark
public static readonly DependencyProperty FilterWatermarkProperty = DependencyProperty.Register("FilterWatermark", typeof(string), typeof(PropertyGrid), new UIPropertyMetadata("Search"));
public string FilterWatermark
{
get { return (string)GetValue(FilterWatermarkProperty); }
set { SetValue(FilterWatermarkProperty, value); }
}
#endregion //FilterWatermark
#region IsCategorized
public static readonly DependencyProperty IsCategorizedProperty = DependencyProperty.Register("IsCategorized", typeof(bool), typeof(PropertyGrid), new UIPropertyMetadata(true, OnIsCategorizedChanged));
@ -403,7 +413,7 @@ namespace Microsoft.Windows.Controls.PropertyGrid
}
}
descriptors = new PropertyDescriptorCollection(specificProperties.ToArray());
descriptors = new PropertyDescriptorCollection(specificProperties.ToArray());
}
foreach (PropertyDescriptor descriptor in descriptors)

2
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml

@ -420,7 +420,7 @@
</Grid.ColumnDefinitions>
<extToolkit:WatermarkTextBox x:Name="_txtFilter" Background="Transparent"
Text="{Binding Filter, RelativeSource={RelativeSource TemplatedParent}, UpdateSourceTrigger=PropertyChanged}"
Watermark="Search">
Watermark="{TemplateBinding FilterWatermark}">
<extToolkit:WatermarkTextBox.Style>
<Style TargetType="Control">
<Setter Property="BorderThickness" Value="0" />

Loading…
Cancel
Save