Manish Pansiniya's Blog

.NET, C#, Javascript, ASP.NET and lots more…:)

DesignMode property in WPF

with 3 comments

To decide whether window or page in design mode, following is the code which returns boolean value

System.ComponentModel.DesignerProperties.GetIsInDesignMode(this);

Written by Manish

December 6, 2007 at 12:37 pm

Posted in .NET 3.0

3 Responses

Subscribe to comments with RSS.

  1. Thanks. It helped.

    Atul Gupta

    February 13, 2008 at 11:46 am

  2. Thanks! I had a user control on a window and the XAML designer wouldn’t show it because of some MVVM logic I had in the user control’s constructor. Now I just wrap the logic with this check and both designer and run-time code are happy!

    BillyBob

    April 26, 2010 at 11:38 pm

  3. I have a winForm and inside a WPF control, this code does not work for the WPF control.

    jora

    November 8, 2010 at 6:16 pm


Leave a comment