Created
October 25, 2010 23:18
-
-
Save andersonimes/645999 to your computer and use it in GitHub Desktop.
Determining Design Mode from Attached Properties
This file contains 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
private bool IsDesignMode { | |
get { | |
DependencyProperty isDesignModeProperty = (DependencyProperty)AppDomain.CurrentDomain.GetData(“IsDesignModeProperty”); | |
return isDesignModeProperty == null ? false : true.Equals(isDesignModeProperty.GetValue(this)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment