Thumbnail View Resource
Source (Windows Presentation Foundation SDK Blog), posted 2009-08-27

Added By

Avatar BillHenn on 2009-08-27

  • 2140 total views
A discussion of how implicit styles are applied to elements in a template.
"Even though I've been working with WPF for over 3 years, I'm still learning some of its idiosyncrasies. A discussion came up recently about whether implicit styles are applied to elements in a template. It turns out that the answer is, it depends on whether the element inherits from Control. Consider the following example. This example creates an implicit style for a Label and another implicit style for a TextBlock. Then it defines a ControlTemplate for a Control, in which is a Label and TextBlock. Finally, the example adds a Control, TextBlock, and Label to the StackPanel. So this XAML displays a TextBlock and Label, which are part of the Control, and another TextBlock and Label, which are not part of the Control."
Full Link

About Windows Presentation Foundation SDK Blog

The official Microsoft blog for all Windows Presentation Foundation SDK writers and editors. They post lots of general information about WPF-related news and some helpful tips too.

The WPFpedia resource guide has 36 total links to this site.


There aren't any comments yet for this resource. Be the first to add one!

Add a Comment

Please log in to post comments.



Thumbnail Screenshots by Thumbshots