Skip to content

Instantly share code, notes, and snippets.

@andersonimes
Created October 25, 2010 23:18
Show Gist options
  • Save andersonimes/645999 to your computer and use it in GitHub Desktop.
Save andersonimes/645999 to your computer and use it in GitHub Desktop.
Determining Design Mode from Attached Properties
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