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

RadPane pin/unpin Issue

3 Answers 102 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Fábio Witt jagnow
Top achievements
Rank 2
Fábio Witt jagnow asked on 20 Jul 2011, 06:23 PM

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.

3 Answers, 1 is accepted

Sort by
0
Accepted
Konstantina
Telerik team
answered on 26 Jul 2011, 08:34 AM
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!

0
Fábio Witt jagnow
Top achievements
Rank 2
answered on 26 Jul 2011, 02:33 PM
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

0
Konstantina
Telerik team
answered on 27 Jul 2011, 02:12 PM
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!

Tags
Docking
Asked by
Fábio Witt jagnow
Top achievements
Rank 2
Answers by
Konstantina
Telerik team
Fábio Witt jagnow
Top achievements
Rank 2
Share this question
or