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

Option to pin/unpin RadPaneGroup instead of RadPane??

5 Answers 219 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 22 Nov 2010, 06:09 PM
Hello,

I am getting started with the RadDocking control and noticed a behavior that I would like to have but I'm not sure is possible...

I am wondering if there is a way to pin/unpin an entire "RadPaneGroup" or "RadSplitContainer" instead of just the "RadPane" like in Visual Studio...  I am hoping there is just an option that I am missing but have included a few screenshots of the behavior I am looking for and what currently happens. 

I have also included my xaml code here in case I am simply structuring the xaml poorly...
<telerik:RadDocking>
  <telerik:RadDocking.DocumentHost>
    <telerik:RadPaneGroup MinHeight="100">
      <telerik:RadPane Header="Main" CanUserClose="False">
        <Border Background="#FFD5BCF5" BorderBrush="#FF330080" BorderThickness="2">
          <TextBlock Text="Main" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" />
        </Border>
      </telerik:RadPane>
    </telerik:RadPaneGroup>
  </telerik:RadDocking.DocumentHost>
  <telerik:RadSplitContainer InitialPosition="DockedRight">
    <telerik:RadPaneGroup>
      <telerik:RadPane x:Name="subpanel1" Header="SubPanel(1)" CanUserClose="False" CanUserPin="True">
        <Border Background="YellowGreen" BorderBrush="Green" BorderThickness="2">
          <TextBlock Text="SubPanel(1)" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" />
    </Border>
      </telerik:RadPane>
      <telerik:RadPane x:Name="subpanel2" Header="SubPanel(2)" CanUserClose="False" CanUserPin="True">
        <Border Background="#FFF9F4BB" BorderBrush="#FFFFAF00" BorderThickness="2">
          <TextBlock Text="SubPanel(2)" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" />
        </Border>
      </telerik:RadPane>
    </telerik:RadPaneGroup>
  </telerik:RadSplitContainer>
</telerik:RadDocking>


Thanks,
Rob

5 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 23 Nov 2010, 04:42 PM
Hi Rob,

Thank you for contacting us.

We don't support such feature out of the box, but you could implement it manually. I would suggest you to customize the RadPane's Menu and add your custom command that unpin all panes. In order to do this, you could use RadPaneGroup.UnpinAllPanes() method. To pin all panes together, you could use RadPaneGroup.PinAllPanes() method.

For more information how to customize the RadPane' Menu, please refer to the following link - http://www.telerik.com/help/silverlight/raddocking-how-to-add-menu-items-to-the-radpanes-menu.html.

I hope this helps. Please do not hesitate to contact us if you require any further information.

Sincerely yours,
George
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Dave A-W
Top achievements
Rank 1
answered on 02 Jun 2011, 08:03 AM
I tried to implement this functionality too, and got part way there by binding the IsPinned property RadPanes together.  BUT, this behavior isn't desirable if the user drags a tab to a different dock area, and falls over altogether if they float a pane and then pin/unpin one of the other panes.

So I then used the RadDock's PreviewPin and PreviewUnpin events to find the parent container of whichever pane was being [un]pinned, and iterated through the pane's siblings to [un]pin each of them too.  I don't use the original RadPaneGroup.[Un]PinAllPanes() methods because the groups change at run-time when the user drags panes around.

But unfortunately this seems buggy with the 2011 Q1 release.  The pin icons do change to reflect the intended new [un]pinned state, but the panes stay stuck where they are - either auto-hidden or docked.  If auto-hidden, I can then no longer hover to expand the pane - if docked, clicking the pin (which looks unpinned) just causes an error.

Did you have any luck with alternative methods Rob?
0
arthurd
Top achievements
Rank 1
answered on 05 Jun 2011, 08:02 PM
I do something similar in my app -- I have buttons to pin or unpin all docked panes thus leaving only those panes in the document host still visible. My app has a user customizable page layout with a mix of docking panes around the perimeter of the screen and a document host in the middle.

In this below example, _allRadPaneViewModels is just a kludge to keep a dictionary of all dynamically added panes and their view-models (you could also just walk the xaml tree looking for RadPane because I am not even using the view-model here). The important thing is to check for IsFloating and IsInDocumentHost. The Key in this dictionary is a RadPane.

/// <summary>
/// Loop through all widgets on this page and pin or unpin each one
/// if it is able to be pinned or unpinned (not floating or in the middle document host region).
/// </summary>
/// <param name="pin"></param>
private void PinUnpinWidgets(bool pin)
{
    foreach (var x in _allRadPaneViewModels)
    {
        if (null != x.Key && null != x.Value && !x.Key.IsFloating && !x.Key.IsInDocumentHost)
            x.Value.IsPinned = pin;
    }
}
0
ss
Top achievements
Rank 1
answered on 12 Jul 2011, 06:31 AM
hi,

i am using docking on my mainpage.

in docuing i ahve documnethost and splitcontailner.

i need to make the IsCenterIndicatorVisible is false for doucmnethost and

 

IsCenterIndicatorVisible is true for split container.

please help me on this.

only in split container i need to make the

 

IsCenterIndicatorVisible is true.

0
George
Telerik team
answered on 15 Jul 2011, 09:56 AM
Hello, 


Please, refer to the following help articles where you can find additional information about RadDocking compass:
  1.  http://www.telerik.com/help/silverlight/raddocking-features-compass.html 


Kind regards,
George
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
Rob
Top achievements
Rank 1
Answers by
George
Telerik team
Dave A-W
Top achievements
Rank 1
arthurd
Top achievements
Rank 1
ss
Top achievements
Rank 1
Share this question
or