When you’re building usercontrols in a Windows Phone 7 project, it’s often necessary to know whether the code is running in Design Mode (i.e. being invoked by the Visual Studio IDE or by Expression Blend), or whether you’re actually running in the real program.
It’s a trivial matter, really, but it can be hard to remember exactly how to do it when I need it, so I wrapped it in an IsInDesigner function:
Public Function IsInDesigner() As Boolean Return System.ComponentModel.DesignerProperties.IsInDesignTool End Function
One Comment
thanks, it’s helpful!