A Context-Sensitive Help Provider in Wpf

Here’s an example of a way to add context-sensitive help to your application.  The main idea is to simply use the built-in ApplicationCommands.Help command.  This command is already tied to the F1 key, and so executes when you hit F1, and tells your command handler what element the user was on when it was hit….

20

A look at stretchy elements

There are several elements in Wpf that have a “Stretch” property.  The basic idea of these properties is to allow you to specify how an element adapts itself to a layout container, such as a Grid.  For example, if you have a 100×200 pixel image, and it’s being positioned in a 150×300 pixel cell in…

1

Building read-only objects in Xaml

We often use Xaml to instantiate and initialize objects.  For example, given “<Foo Bar=’1’/>”, a Xaml loader creates a Foo object, and sets the Bar property to 1.  That works when the Bar property is settable, but what can you do if it isn’t?   An example of this scenario in .Net today shows up…

1