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

Update NavigationPane when Diagram is hidden

5 Answers 160 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Tulio
Top achievements
Rank 1
Tulio asked on 05 Mar 2019, 11:37 PM

Hi!

 

I have a diagram defined inside a docking window that can be hidden.

The NavigationPane works fine updating when there are changes to my diagram. However when I hide the Docking panel that contains the diagram (hiding the diagram), the navigation pane doesn't get updated anymore.

 

Is there a way to workaround that?

 

Thanks!

5 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 08 Mar 2019, 11:17 AM
Hello Tulio,

This is an interesting scenario. I have tested the NavigationPane in the RadDocking and it is updated as expected. May I ask you to share your application set-up. What do you mean by hiding the window? I have tested the navigation pane using the following code.
<telerik:RadDocking >
    <telerik:RadDocking.DocumentHost>
        <telerik:RadSplitContainer >
            <telerik:RadPaneGroup >
                <telerik:RadPane Header="Description" >
                    <Grid>
                        <telerik:RadDiagram x:Name="diagram" >
                            <telerik:RadDiagramShape Content=" Shape 1" Position="200,300"/>
                        </telerik:RadDiagram>
                        <telerik:RadDiagramNavigationPane Diagram="{Binding ElementName=diagram}"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Bottom"/>
                    </Grid>
                </telerik:RadPane>                     
            </telerik:RadPaneGroup>
        </telerik:RadSplitContainer>
    </telerik:RadDocking.DocumentHost>
</telerik:RadDocking>

Also, you can list the exact steps so I can try to reproduce this on my side.

Regards,
Dinko
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Tulio
Top achievements
Rank 1
answered on 08 Mar 2019, 04:18 PM

Hey Dinko,

Thanks for the reply.

This is my xaml below. 

The NavigationPane is closed by default due to performance concerns. If I close the docking pane that contains my diagram (notice that the navigation pane is outside the docking pane) using the "X" button on top right and then open my navigation pane, it shows empty and doesn't get refreshed even if I set the ShouldRefreshThumbnails boolean to true.

<Grid x:Name="MainGrid">
       <telerik:RadDocking RetainPaneSizeMode="DockingAndFloating"
                       BorderThickness="0"
                       PaneStateChange="RadDocking_PaneStateChange_"   
                       Padding="0"  Background="{DynamicResource Panel_Base_Normal_Background}"
                       PreviewClose="RadDocking_PreviewClose_">
           <telerik:RadDocking.RootCompassStyle>
               <Style TargetType="dock:RootCompass" BasedOn="{StaticResource RootCompassStyle}">
                   <Setter Property="IsTopIndicatorVisible" Value="false" />
                   <Setter Property="IsLeftIndicatorVisible" Value="false" />
                   <Setter Property="IsRightIndicatorVisible" Value="false" />
                   <Setter Property="IsBottomIndicatorVisible" Value="false" />
               </Style>
           </telerik:RadDocking.RootCompassStyle>
           <telerik:RadDocking.CompassStyle>
               <Style TargetType="dock:Compass" BasedOn="{StaticResource CompassStyle}">
                   <Setter Property="IsTopIndicatorVisible" Value="false" />
                   <Setter Property="IsLeftIndicatorVisible" Value="false" />
                   <Setter Property="IsRightIndicatorVisible" Value="false" />
                   <Setter Property="IsBottomIndicatorVisible" Value="false" />
               </Style>
           </telerik:RadDocking.CompassStyle>
           <telerik:RadSplitContainer  MaxWidth="600" MinWidth="200"  telerik:DockingPanel.InitialSize="350,150"
                                   Name="LeftContainer" InitialPosition="DockedLeft">
               <telerik:RadPaneGroup x:Name="LiveFeedGroup">
                   <!--Live Feed-->
                   <telerik:RadPane CanFloat="False" CanUserClose="False" CanUserPin="False" TitleTemplate="{x:Null}" PaneHeaderVisibility="Collapsed">
                       <telerik:RadPane.Content>                                                             
                                   <ListView ItemsSource="{Binding LiveFeed.Items}"
                                             HorizontalAlignment="Stretch"
                                             BorderThickness="0"/>
 
                       </telerik:RadPane.Content>
                   </telerik:RadPane>
               </telerik:RadPaneGroup>
           </telerik:RadSplitContainer>
           <telerik:RadDocking.DocumentHost>
               <telerik:RadSplitContainer >                  
                   <telerik:RadPaneGroup IsContentPreserved="True" Background="{DynamicResource Panel_Base_Normal_Background}">                       
                       <telerik:RadPane Title="Overview" CanUserClose="True" CanUserPin="False" CanFloat="True"
                                    x:Name="OverviewPane"
                                    DataContext="{Binding RelativeSource={RelativeSource AncestorType=telerik:RadDocking}, Path=DataContext}"
                                 
                                    IsHidden="False"                                       
                                    IsActive="True">
                           <Grid Grid.Column="2"  >
                               <Grid.RowDefinitions>
                                   <RowDefinition Height="*"/>
                                   <RowDefinition Height="35"/>
                               </Grid.RowDefinitions>
                                   <Grid >
                                       <telerik:RadDiagram x:Name="diagram"
                                                           MinWidth="500"
                                                           Grid.Row="0"
                                                           CacheMode="BitmapCache"
                                                           telerik:DiagramSurface.IsVirtualizing="True"
                                                           ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                                                           ScrollViewer.VerticalScrollBarVisibility="Hidden"
                                                           IsSnapToGridEnabled="False"
                                                           IsConnectorsManipulationEnabled="False"
                                                           SelectionMode="None"
                                                           IsSnapToItemsEnabled="False"
                                                           IsInformationAdornerVisible="False"
                                                           telerik:DiagramAnimations.IsPanAnimationEnabled="False"
                                                           telerik:DiagramAnimations.IsZoomAnimationEnabled="False"
                                                           IsZoomEnabled="True"
                                                           AllowDelete="False"
                                                           IsEditable="False"
                                                           AllowPaste="False"
                                                           Primitives:BackgroundGrid.IsGridVisible="False"
                                                           AutoLayout="True"
                                                           Primitives:BackgroundPageGrid.IsGridVisible="False"
                                                           GraphSource="{Binding Nodes, Mode=OneWay}"/>
                                   </Grid>   
                           </Grid>
                       </telerik:RadPane>
                   </telerik:RadPaneGroup>
               </telerik:RadSplitContainer>
           </telerik:RadDocking.DocumentHost>
       </telerik:RadDocking>
       <telerik:RadDiagramNavigationPane Diagram="{Binding ElementName=diagram}"
                                     x:Name="navigationPane"
                                     Grid.Row="0"
                                     Behaviours:RadDiagramNavigationPaneBehaviours.RefreshThumbnails="{Binding ShouldRefreshThumbnails}"
                                     IsExpanded="False"
                                     HorizontalAlignment="Right"
                                     VerticalAlignment="Bottom"
                                     Margin="0,0,8,43">
       </telerik:RadDiagramNavigationPane>
       
   </Grid>
0
Dinko | Tech Support Engineer
Telerik team
answered on 13 Mar 2019, 11:20 AM
Hello Tulio,

Thank you for the provided code snippet.

I have double check this and the navigation pane was not empty when the Pane with the Diagram is closed. I am attaching the sample project which I used to test your scenario. May I ask you to check it out and let me know what I am missing from your implementation. Also, in the code snippet, it seems that you are using NoXAML binaries. Can you share which theme is referenced and which version of out controls are used?

Looking forward to your reply.

Regards,
Dinko
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Tulio
Top achievements
Rank 1
answered on 13 Mar 2019, 07:50 PM

Hi Dinko,

 

Thanks for your sample.

I've downloaded here, replaced with my dlls(2019.1.116.40 no xaml)  and the xaml files from the same version (using office 2016 theme) and I could reproduce the problem. the steps are.

 

1)Start the app with the navigation collapsed.

2) Close the Docking panel that contains the diagram

3) Expand the navigation. The navigation now shows empty.

 

Let me know if following these steps you can reproduce the issue.

0
Dinko | Tech Support Engineer
Telerik team
answered on 18 Mar 2019, 01:03 PM
Hello Tulio,

Thank you for the provided steps. 

I manage to reproduce this behavior. Basically, if the navigation pane is not expanded when the diagram was visible, the control will not load the diagram items. The approach here is to use the IsExpanded property. I have searched for a possible solution and I think I manage to found one. I know that it will need to show and hide the navigation pane but using this approach I was able to workaround the flickering. Basically, you can set the IsExpanded property to true initially and set it to false in the Loaded event. Then when the RadPane is closed you can again show the navigationPane set again the diagram and refresh the thumb. This approach is only in case the navigation pane is not expanded. If the NavigationPane is expanded while the Diagram is visible everting works as expected.

Regards,
Dinko
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Diagram
Asked by
Tulio
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Tulio
Top achievements
Rank 1
Share this question
or