Watermark on PropertyGrid editors

Oct 28, 2011 at 5:25 PM

In the project I am working on default PropertyGrid editors are fine, but since I use nullable types I want to set watermark on each editor. Can I do it without creating custom editor for each property?

Oct 28, 2011 at 5:27 PM

If you want to use custom watermarks you must define a custom editor.  The easiest way is to create a DataTemplate.

Oct 28, 2011 at 6:23 PM

Not custom watermark. Just a regular text like Watermark="Enter Value:". However I don't know how to access each individual editor to set it.  But I guess that requires custom editor too?

Oct 28, 2011 at 9:02 PM

Yes, if you want to set properties on the editors you must define editors within an EditorDefinition.

http://wpftoolkit.codeplex.com/wikipage?title=PropertyGrid&referringTitle=Documentation#custom_editors_dataTempates