Feed on
Posts
Comments

Tag Archive 'Dependency Properties'

This is a ReSharper code snippet I’ve been using quite a lot lately - it allows you to easily create a WPF dependency property along with event handlers, documentation, and initialization code. Here’s a sample:

#region MyStringProperty dependency property

/// <summary>
/// This is a sample string property.
/// </summary>
public static readonly DependencyProperty MyStringPropertyProperty;

//TODO: copy to static constructor
//register dependency […]

Read Full Post »

Explicitly update binding sources

In WPF data binding scenarios, the binding source is usually updated implicitly - if you, for example, edit the text of a bound TextBox control, the underlying binding source is updated a soon as the control loses focus.
This is something you might want to prevent sometimes - a common scenario is a model dialog that […]

Read Full Post »