RadPane pin/unpin Issue

4 posts, 1 answers
  1. Fábio Witt jagnow
    Fábio Witt jagnow avatar
    14 posts
    Member since:
    Mar 2010

    Posted 20 Jul 2011 Link to this post


    I'm having an issue when adding a new RadPane to a RadPaneGroup. Here's the code i created to reproduce it. It's fairly short...

    Code:

    private void ButtonAddPane_Click(object sender, RoutedEventArgs e)
    {
        var pane = new RadPane();
        pane.Header = "Testing";
        pane.Content = new NewControl();
        PaneGroup.AddItem(pane, Telerik.Windows.Controls.Docking.DockPosition.Bottom);
    }

    Xaml:

    <UserControl x:Class="RadDockingBugTest.MainPage"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                 mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400">
     
        <Grid x:Name="LayoutRoot" Background="White">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>
     
            <Button x:Name="ButtonAddPane"  Content="Add"  Click="ButtonAddPane_Click" />
     
            <telerik:RadDocking x:Name="Docking"
                                Grid.Row="1">
                <telerik:RadDocking.DocumentHost>
                    <telerik:RadSplitContainer Background="Transparent">
                        <telerik:RadPaneGroup Background="{x:Null}"
                                              BorderBrush="{x:Null}">
                            <telerik:RadDocumentPane PaneHeaderVisibility="Collapsed"
                                                     CanFloat="False"
                                                     Background="{x:Null}"
                                                     BorderThickness="0"
                                                     CanUserClose="False"
                                                     Header=""
                                                     Title=""
                                                     Width="0"
                                                     Height="0"
                                                     BorderBrush="{x:Null}">
                                <Grid x:Name="GridContainer"
                                      VerticalAlignment="Stretch"
                                      HorizontalAlignment="Stretch">
                                </Grid>
                            </telerik:RadDocumentPane>
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
                </telerik:RadDocking.DocumentHost>
     
                <telerik:RadSplitContainer telerik:DockingPanel.InitialSize="250,250"
                                           InitialPosition="DockedLeft">
                    <telerik:RadPaneGroup>
                        <telerik:RadPane Header="Controls"
                                         CanUserClose="False" />
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
     
                <telerik:RadSplitContainer Orientation="Vertical"
                                           InitialPosition="DockedRight"
                                           telerik:DockingPanel.InitialSize="300,300">
                    <telerik:RadPaneGroup>
                        <telerik:RadPane Header="Configuration"
                                         CanUserClose="False" />
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
     
                <telerik:RadSplitContainer Orientation="Vertical"
                                           InitialPosition="DockedBottom"
                                           telerik:DockingPanel.InitialSize="250,250">
                    <telerik:RadPaneGroup x:Name="PaneGroup" />
                </telerik:RadSplitContainer>
            </telerik:RadDocking>
        </Grid>
    </UserControl>

    The issue it's quite simple. Add a pane using the AddItem method from RadPaneGroup. This pane must contain some UserControl or some content that it's easily visible, in my case it's an UserControl with a black background. Pin this newly added pane, and unpin it. For some reason that i do not know, the content from the pane disappears, the content inside the pane suddenly becomes white.

    Could you guys please help me ?

    Obs: Using the latest build.

    Thanks,
    Fábio Witt.

  2. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 26 Jul 2011 Link to this post

    Hi Fábio,

    Could you please try to add the pane to the group using the Add() method of the Items collection, as explained in this help article.

    Please let us know if that helped.

    Greetings,
    Konstantina
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. DevCraft banner
  4. Fábio Witt jagnow
    Fábio Witt jagnow avatar
    14 posts
    Member since:
    Mar 2010

    Posted 26 Jul 2011 Link to this post

    Yes, it worked fine. I really appreciate your help.

    Is there a reason why i can't use that AddItem method? Or it's used in other scenarios? 

    Thanks in advance,
    Fábio Witt

  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 27 Jul 2011 Link to this post

    Hello Fábio,

    The AddItem() method is for internal use and we do not recommend its use.

    Kind regards,
    Konstantina
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Back to Top