How to disable RadBusyIndicator in design mode?

2 posts, 0 answers
  1. Peter
    Peter avatar
    37 posts
    Member since:
    Dec 2011

    Posted 16 Sep 2013 Link to this post

    We are using a RadBusyIndicator and everything is working fine, except the fact, that the BusyIndicator disables editing of enclosed controls in Design Mode.

    Imagine there is a window with some buttons and textboxes and the BusyIndicator encloses these buttons and textboxes. During runtime enabling and disabling these controls via BusyIndicator works fine, but in VS2010 design mode you cannot e.g. shift the buttons around. Of course you can manually change the xaml code, but this is cumbersome.

    Question: If I have integrated a BusyIndicator like this, how do I disable it during design time?

    <telerik:RadBusyIndicator 
    IsBusy="{Binding IsBusy, FallbackValue=False, TargetNullValue=False}" ...>
    Some Buttons and TextBoxes
    </telerik:RadBusyIndicator>
    
     
  2. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 16 Sep 2013 Link to this post

    Hello Peter,

    In order to achieve this you can check if you are in Design time and set the IsBusy property of your ViewModel only if the app is not in Design mode:
    if (RadControl.IsInDesignMode)
    {
        this.IsBusy = false;
    }
    else
    {
        this.IsBusy = true;
    }

    Hope this helps.

    Regards,
    Rosen Vladimirov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top