Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
private IDisposable _contentWatcher;
private void StartWatchingContent()
{
_contentWatcher = myControl.WatchProperty("Content", myControl_ContentChanged);
}
private void StopWatchingContent()
{
_contentWatcher.Dispose();
}
private void myControl_ContentChanged(object sender, DependencyPropertyChangedEventArgs e)
{
MessageBox.Show("Content has changed!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.