Browse by Tags

Tagged Content List
  • Blog Post: Experiments with WindowChrome

    In July, the Microsoft Ribbon for WPF was released. Hopefully you saw the announcements from the WPF Team and on Pete Brown’s blog , and have already downloaded the Ribbon. A little bonus that you get with the Ribbon is the WPF Shell Integration Library and documentation for it on MSDN. This library...
  • Blog Post: Implicit Styles, Templates, Controls and FrameworkElements

    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...
  • Blog Post: The VisualStateManager and Triggers

    Silverlight introduced the Visual State Manager, which makes it easier for control template authors to specify the appearance of a control depending on its visual state. The WPF Toolkit ships a Visual State Manager, and the next version of WPF will include the VSM as well. The introduction of the VisualStateManager...
  • Blog Post: Discuss! Is there confusion about styles versus templates?

    Are you or have you been confused by what is a style and what is a template? Our documentation hasn’t always been as clear as it can be when discussing Styles and Templates and we’re wondering if we need to be better at distinguishing the two, or if people are able to pick up on the differences pretty...
  • Blog Post: Using Themes with Custom Controls

    Last month I explained how to use shared resources in a control library . This month I’ll create an example that uses different styles based on the current setting of the desktop theme. You can define a different look and feel based on the desktop theme by adding a resource dictionary to the Themes...
  • Blog Post: How do I programmatically interact with template-generated elements? Part II

    This post shows you how to find a named element within a DataTemplate. In Part I , we discussed how to find a named element within a ControlTemplate. That was fairly simple; you’d call Template.FindName on the control that the ControlTemplate has been applied to. But if the template is a DataTemplate...
  • Blog Post: How do I programmatically interact with template-generated elements? Part I

    You may have a scenario that requires you to find an element within a ControlTemplate. To do that, you use Template.FindName. Say you have a simple ControlTemplate for a Button, like the following: < Style TargetType = " {x:Type Button} " > < Setter Property = " Template " >...
  • Blog Post: "Styling" the content of a ContentControl

    People have occasionally asked about using a Style to set the content of a control. For example, suppose you want all of your buttons in an application to have the same content. You can do something like this (As usual, this doesn’t make sense for a real world scenario, but it gives a simple example...
  • Blog Post: Are You My Mother? A look into how property inheritance works with the logical and visual element trees.

    I was recently working on an article for the SDK and noticed some unexpected behavior in one of my examples. After a long discussion with a developer on the team, I caught onto some concepts that weren’t readily obvious to me. I’m going to share my findings here in the chance that it helps someone else...
  • Blog Post: Styles and Templates - How's everything related?

    People who are new to the platform often have these questions about styles and templates (and a related concept, resources): What is a Resource? In the simplest terms, a resource is a reusable object. For example, the following SolidColorBrush is declared and used as a resource: < Window...
Page 1 of 1 (10 items)