Created
February 5, 2011 01:05
-
-
Save anaisbetts/812092 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static void RegisterDepPropCallback(This DependencyObject owner, DependencyProperty property, EventHandler handler) | |
| { | |
| var dpd = DependencyPropertyDescriptor.FromProperty(property, owner.GetType()); | |
| dpd.AddValueChanged(owner, handler); | |
| } | |
| mainWindow.RegisterDepPropCallback(MainWindowClass.ViewModelProperty, (o,e) => { | |
| Console.WriteLine("ViewModel changed!"); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment