Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
swdev:dotnet:wpf:styles_and_triggers [2010/07/09 09:12] 127.0.0.1 external edit |
swdev:dotnet:wpf:styles_and_triggers [2011/04/27 14:30] (current) smayr |
||
---|---|---|---|
Line 41: | Line 41: | ||
Source: [[http:// | Source: [[http:// | ||
+ | === Style Tricks === | ||
+ | |||
+ | To use a parent property value, rather than a predefined value, use '' | ||
+ | <code xml> | ||
+ | < | ||
+ | <Setter Property=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | | ||
+ | | ||
+ | /> | ||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Restyle Datagrid' | ||
+ | <code xml> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | <code csharp> | ||
+ | this.dataGrid.Columns.Add(new DataGridTemplateColumn{ | ||
+ | CellTemplate=this.Resources[" | ||
+ | |||
+ | // OR this way: | ||
+ | column2.ElementStyle = Application.Current.FindResource(" | ||
+ | </ | ||
== Triggers == | == Triggers == | ||
Line 124: | Line 160: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | == iPad-style Switch (using CheckBox) == | ||
+ | |||
+ | <code xml> | ||
+ | <!--iPad style Switch--> | ||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <Border x: | ||
+ | <Grid Width=" | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | <Trigger Property=" | ||
+ | <Setter TargetName=" | ||
+ | <Setter TargetName=" | ||
+ | <Setter TargetName=" | ||
+ | <Setter TargetName=" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | == Resources == | ||
+ | * [[http:// |