Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
415
Setter Properties
posted

Hi

 

Iam relatively new to WPF, but have managed to create application wide resource dictionary for specific styles/house standards. 

What I would like to know, in order to make life a little easier, is where and how do you determine all the possible setter properties for the controls?

E.g. a sample style:

<Style TargetType="{x:Type DataGridCellsPresenter}">
  
 <Style TargetType="{x:Type igEditors:XamTextEditor}">
  <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
  <Setter Property="BorderBrush" Value="{DynamicResource EditorsBrushKeys.EditorsNormalBorderFillKey}"/>
  <Setter Property="BorderThickness" Value="1"/>
  <Setter Property="Padding" Value="2"/>
  <Setter Property="Margin" Value="{DynamicResource EditorsBrushKeys.TextEditorMarginKey}"/>
  <Setter Property="SnapsToDevicePixels" Value="True"/>
  <Setter Property="Template">

..

etc

 

Some obvious properties work, like borderthickness but not on all controls.  There is no inteli-sense in WFP/Blend when you type <Setter Property=

Is there a document or web link that can list each property and the format of the value (e.g. expecting a numeric, or boolean or ...)

It is proving frustrating when you have to blindly enter property name only then to get a red-underline as error to say its not supported.  If the system knows what is/is not supported for a specific style/target type then surely there must be a list somewhere?

 

Help

Urfan