This is a migrated thread and some comments may be shown as answers.

How to style BusyIndicator to be invisible?

2 Answers 94 Views
BusyIndicator
This is a migrated thread and some comments may be shown as answers.
Anders
Top achievements
Rank 1
Anders asked on 12 Oct 2011, 10:07 AM
Hi telerik,

I have an application with dockable windows. to 'protect' windows that might be undocked during long-running operations, I have applied BusyIndicators to each individual window. The BusyIndicators are linked to a singleton viewmodel and it works perfectly.

As for the visual part of the BusyIndicator, I only want it in the main window.

Can you advice me on how to style the BusyIndicator on child windows to make the progress/busy indicator invisible?

Thanks,

Anders, Denmark

2 Answers, 1 is accepted

Sort by
0
Accepted
Dani
Telerik team
answered on 13 Oct 2011, 07:33 AM
Hello Anders,

Accomplishing what you wish is quite easy. You just need to reduce the control template of RadBusyIndicator to a single ContentControl. Please, consider the following example:

<Window
    x:Class="WpfApplication1.MainWindow"
    x:Name="Window"
    Title="MainWindow"
    Width="640" Height="480">
    <Window.Resources>
        <ControlTemplate x:Key="RadBusyIndicatorTemplate" TargetType="telerik:RadBusyIndicator">
            <ContentControl x:Name="Content" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" 
            IsEnabled="False" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </ControlTemplate>              
    </Window.Resources>
  
    <Grid x:Name="LayoutRoot">
        <telerik:RadBusyIndicator Margin="176,89,148,53" IsBusy="True" Template="{StaticResource RadBusyIndicatorTemplate}">
            <telerik:RadButton Content="Test" Width="200" VerticalAlignment="Center" HorizontalAlignment="Center" />
        </telerik:RadBusyIndicator>         
    </Grid>
</Window>

I hope this helps.

Regards,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Anders
Top achievements
Rank 1
answered on 17 Oct 2011, 08:03 PM
Works like a charm!

And thanks :)

Anders
Tags
BusyIndicator
Asked by
Anders
Top achievements
Rank 1
Answers by
Dani
Telerik team
Anders
Top achievements
Rank 1
Share this question
or