RadPane Hide Itself

2 posts, 1 answers
  1. Ahmad
    Ahmad avatar
    27 posts
    Member since:
    May 2015

    Posted 10 Oct 2016 Link to this post

    Hi,
    I have a strange problem with docking control:
    as you see in following code I have a unpinned RadPane(there are 4 tabs inside the RadPane). I hover mouse over RadPane and it appears.
    when I click in TAB1 and click the Button and click TAB2, RadPane hides itself.
    please help me to fix it.
    thanks.

    My code:

     <telerik:RadDocking HorizontalAlignment="Stretch">
                <telerik:RadSplitContainer MinWidth="300" InitialPosition="DockedRight">
                    <telerik:RadSplitContainer >
                        <telerik:RadPaneGroup  >
                            <telerik:RadPane CanFloat="False" CanUserPin="True" CanDockInDocumentHost="False"
                                             x:Name="pane"
                                             CanUserClose="False" Header="PaneHeader"
                                             IsPinned="False" AutoHideWidth="300">
                                <telerik:RadTabControl>
                                    <telerik:RadTabItem Header="TAB1">
                                        <Grid>
                                            <telerik:RadButton Content="Button"/>
                                        </Grid>
                                    </telerik:RadTabItem>
                                    <telerik:RadTabItem Header="TAB2" IsSelected="True">
                                        <Grid>
                                            <TextBlock Text="Nothing"/>
                                        </Grid>
                                    </telerik:RadTabItem>
                                    <telerik:RadTabItem Header="TAB3">
                                        <Grid>
                                            <TextBlock Text="Nothing"/>
                                        </Grid>
                                    </telerik:RadTabItem>
                                    <telerik:RadTabItem Header="TAB4">
                                        <Grid>
                                            <TextBlock Text="Nothing"/>
                                        </Grid>
                                    </telerik:RadTabItem>
                                </telerik:RadTabControl>
                            </telerik:RadPane>
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
                </telerik:RadSplitContainer>
            </telerik:RadDocking>

     

     

  2. Answer
    Nasko
    Admin
    Nasko avatar
    679 posts

    Posted 11 Oct 2016 Link to this post

    Hello Ahmad,

    The observed by you issue seems to be caused by the TabControl. When you click between the tabs of the TabControl (tabs with content like the one with the Button) its Content gets loaded that on the other hand deactivates the currently selected Pane and because of that the Pane is closed. What we could suggest you is to set the IsContentPreserved property of the TabControl to True and everything should be working as expected:
    <telerik:RadDocking HorizontalAlignment="Stretch">
        <telerik:RadSplitContainer MinWidth="300" InitialPosition="DockedRight">
            <telerik:RadSplitContainer >
                <telerik:RadPaneGroup  >
                    <telerik:RadPane CanFloat="False" CanUserPin="True" CanDockInDocumentHost="False"
                                        x:Name="pane"
                                        CanUserClose="False" Header="PaneHeader"
                                        IsPinned="False" AutoHideWidth="300">
                        <telerik:RadTabControl IsContentPreserved="True">
                            <telerik:RadTabItem Header="TAB1">
                                <Grid>
                                    <telerik:RadButton Content="Button"/>
                                </Grid>
                            </telerik:RadTabItem>
                            <telerik:RadTabItem Header="TAB2" IsSelected="True">
                                <Grid>
                                    <TextBlock Text="Nothing"/>
                                </Grid>
                            </telerik:RadTabItem>
                            <telerik:RadTabItem Header="TAB3">
                                <Grid>
                                    <TextBlock Text="Nothing"/>
                                </Grid>
                            </telerik:RadTabItem>
                            <telerik:RadTabItem Header="TAB4">
                                <Grid>
                                    <TextBlock Text="Nothing"/>
                                </Grid>
                            </telerik:RadTabItem>
                        </telerik:RadTabControl>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadSplitContainer>
    </telerik:RadDocking>

    Hope this helps.

    Regards,
    Nasko
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top