A style in WPF can base on another style. This allows you to specify a base style that sets common properties and derive from it for specialized controls.
 |
| Di | |
|
| Commented on 25.February 2009 |
| Just want i was wondering about...helpful! I like your simple and concise explanations about WPF throughout the site. Good professional looking site!
|
|
|
 |
| santhosha k r | |
|
| Commented on 21.April 2009 |
| Nice thing.
|
|
|
 |
| robotix1986 | |
|
| Commented on 14.May 2009 |
| yeah... quite helpful
|
|
|
 |
| jlm | |
|
| Commented on 5.June 2009 |
| Nice and simple, but where does these blocks go?
|
|
|
 |
| Giovanni | |
|
| Commented on 11.November 2009 |
A Style needs a TargetType, so the example is incomplete. Should be (for example):
<Style x:Key="baseStyle" TargetType="{x:Type TextBox}"
|
|
|
 |
| Sergey Malyan | |
|
| Commented on 26.May 2010 |
Suggesting to inherit the original Style from "default" TextBlock style.
Like this:
<Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
|
|
|