BusyIndicator inside RadDocking DocumentHost

4 posts, 0 answers
  1. Marcel
    Marcel avatar
    41 posts
    Member since:
    Jan 2014

    Posted 11 Aug 2015 Link to this post

    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

     

  2. Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 12 Aug 2015 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Marcel
    Marcel avatar
    41 posts
    Member since:
    Jan 2014

    Posted 12 Aug 2015 Link to this post

    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

  5. Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 14 Aug 2015 Link to this post

    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
Back to Top