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

BusyIndicator inside RadDocking DocumentHost

3 Answers 106 Views
BusyIndicator
This is a migrated thread and some comments may be shown as answers.
Marcel
Top achievements
Rank 1
Marcel asked on 11 Aug 2015, 02:36 PM

Hello,

 I would like to show a busyindicator inside a documenthost, which I can show when loading the document.

I am using PRISM and the ShellDockingPanesFactory (from the Docking-ShellPrism example) to add my panes to the DocumentHost.

Ho can I implement this functionality without blocking my other documents or other panes?

The code below will block my whole Docking control.

 

<telerik:RadBusyIndicator DockPanel.Dock="Top" IsBusy="{Binding IsBusy}" IsIndeterminate="{Binding IsIndeterminate}"
        ProgressValue="{Binding ProgressValue}" BusyContent="{Binding BusyContent}"
        DisplayAfter="{Binding DisplayAfter}">
             
    <!-- Document tabs -->
    <telerik:RadDocking x:Name="radDocking"
                        prism:RegionManager.RegionName="WorkspaceRegion"
                        Background="LightGray" BorderThickness="0" >
 
        <telerik:RadDocking.DockingPanesFactory>
            <docking:ShellDockingPanesFactory />
        </telerik:RadDocking.DockingPanesFactory>
 
        <!-- Behaviour for catching close command in viewmodel -->
        <telerik:EventToCommandBehavior.EventBindings>
            <telerik:EventBinding Command="{Binding CloseCommand}"
                                    EventName="Close"
                                    PassEventArgsToCommand="True"/>
        </telerik:EventToCommandBehavior.EventBindings>
 
        <telerik:RadSplitContainer Height="200"
                Name="BottomContainer" InitialPosition="DockedBottom">
            <telerik:RadPaneGroup x:Name="BottomPaneGroup"/>
        </telerik:RadSplitContainer>
    </telerik:RadDocking>
             
</telerik:RadBusyIndicator>

 

Please advice.

Marcel

 

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 12 Aug 2015, 10:38 AM
Hi Marcel,

The observed by you appearance of RadBusyIndicator and blocking of RadDcoking is an expected one as you set the whole RadDocking as a Content to the control. Thus the BusyIndicator control gets displayed on top of the Docking control.

So, in order to achieve the desired appearance you need to set as a Content only that Pane or PaneGroup that will be placed as DocumentHost inside RadDocking - the other part of the control that is not part of the BusyIndicator's Content will work as expected:
<telerik:RadDocking x:Name="radDocking">
...
    <telerik:RadDocking.DocumentHost>
        <telerik:RadBusyIndicator IsBusy="True">
            <telerik:RadSplitContainer>
                <telerik:RadPaneGroup x:Name="leftGroup" telerik:RadDocking.SerializationTag="leftGroup"/>
            </telerik:RadSplitContainer>
        </telerik:RadBusyIndicator>
    </telerik:RadDocking.DocumentHost>
...
</telerik:RadDocking>

Hopes this helps.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Marcel
Top achievements
Rank 1
answered on 12 Aug 2015, 12:33 PM

Hello Nasko,

 

But I am using a factory in my solution, the panes are added dynamically when I add them to the PRISM region.

So I dont declare any DocumentHost in XAML, see my first post.

Whats the best way to show the BusyIndicator in this case?

 

Marcel

0
Nasko
Telerik team
answered on 14 Aug 2015, 03:03 PM
Hello Marcel,

You shouldn't have any concerns to use the declared in XAML RadBusyIndicator inside the DockingPanesFactory class - the BusyIndicator will be displayed on top of that PaneGroup that is set as its Content in XAML. Thus it won't be displayed on the whole RadDocking.

The BusyIndicator could be get in the AddPane method. Inside the method you should made your own custom logic to found the right Pane on which the BusyIndicator should be displayed and set the IsBusy property to True.

We have modified our ShellPrism SDK example project with the described above approach and you could run and evaluate it - please, notice that in XAML there are no declared panes as they are generated inside the ShellDockingPanesFactory class.

We hope this will help you.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
BusyIndicator
Asked by
Marcel
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Marcel
Top achievements
Rank 1
Share this question
or