<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.9.2" -->
<rss version="0.92">
<channel>
	<title>PatriceLeVexier.com</title>
	<link>http://www.patricelevexier.com</link>
	<description>Senior Software Developer</description>
	<lastBuildDate>Thu, 10 Jun 2010 03:39:17 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>DependencyProperty value change notification</title>
		<description><![CDATA[In order to get notified when a dependency property value changes, you can use the DependencyPropertyDescriptor.AddValueChanged function to register your own listener.
A simple example that displays the width of the window in a label:


public Window1()
{
InitializeComponent();

DependencyPropertyDescriptor widthDesc = DependencyPropertyDescriptor.FromProperty(Window.WidthProperty, typeof(Window));

if (widthDesc != null)
{
widthDesc.AddValueChanged(this, this.OnValueChanged);
}
}

private void OnValueChanged(object sender, EventArgs args)
{
txtLabel.Text = this.Width.ToString();
}

]]></description>
		<link>http://www.patricelevexier.com/http:/www.patricelevexier.com/blog</link>
			</item>
</channel>
</rss>
