. First you must create an IsDesignMode for yourself:
static public class ApplicationExtensions
{
public static bool IsDesignMode(this Application app)
{
return System.ComponentModel.DesignerProperties.GetIsInDesignMode(app.RootVisual);
}
}
Now, in your control constructor, after calling InitalizeComponents, try something like:
if (Application.IsDesignMode)
LayoutRoot.Background = Colors.Black;
source
share