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

RadPaneGroup unpin behavior

7 Answers 231 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 06 Jul 2015, 10:03 PM

I have the following XAML.

<telerik:RadDocking>
    <telerik:RadPaneGroup>
        <telerik:RadPane Header=”Pane1” />
        <telerik:RadPane Header=”Pane2” />
    </telerik:RadPaneGroup>
</telerik:RadDocking>

Both Pane1 and Pane2 are docked by default and contained within the same pane group so at startup I see two tabs at the bottom and one pin/unpin button at the top. When I click the unpin button at the top I would expect the whole pane group (and thus all its RadPanes) to become undocked and slide to the left but I only see one slide to the left and the other remains open and pined.

This does not seem to be the normal behavior for a dock control, like the one used in Visual Studio itself. Is there a way to configure the Telerik dock control to behave like the dock control used by Visual Studio where when a pane group unpinned it unpins all its sub panes?

7 Answers, 1 is accepted

Sort by
0
Accepted
Kalin
Telerik team
answered on 09 Jul 2015, 08:49 AM
Hi Eric,

The Docking control is inspired from Visual Studio and provides most of the functionality seen in Visual Studio. However, indeed this particular behavior of RadDocking is not identical with the Visual Studio, but you can easily achieve the same by using the Pin and Unpin events of the control and pin/unpin all the Panes in the same group in the event handlers - check the attached sample project.

Hope this helps.

Regards,
Kalin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Eric
Top achievements
Rank 1
answered on 09 Jul 2015, 03:07 PM

Kalin,

Thanks for the reply. I was able to reproduce your suggestion in our project and it worked as described. I believe that most people are going to want this behavior in a docking control so I would recommend that this be added to the Telerik product as a XAML property and/or add this simple code example to the help documentation.

 Also do not call UnPinAllPanes() from the Pin Event. :-)

0
Kalin
Telerik team
answered on 10 Jul 2015, 07:15 AM
Hello,

Thanks for your feedback - I have logged that as Feature Request in our Feedback portal. You can vote for it and track its status on the following link:
http://feedback.telerik.com/Project/143/Feedback/Details/163589-provide-option-to-pin-unpin-the-whole-panegroup-by-clicking-the-pin-button-of-sin

Hope this helps.

Regards,
Kalin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Eric
Top achievements
Rank 1
answered on 15 Jul 2015, 09:26 PM

So now when I click the Pin button, to take the group from an unpinned state to an pinned state, the active RadPane is not the RadPane that was on top when I clicked the Pin button. For example, if I have RadPane(s) A, B, and C and I mouse over RadPane B and it "comes forward" (when the whole group is in an unpinned state) and click the Pin button I would expect to have RadPane B be the active RadPane once the whole group has been pinned but the active RadPane ends up being A or C.

Other Issues.

  1. The order of the RadPane(s) when they are Pinned (in the group) does not match the order they are when they are all unpinned.
  2. Is there a way to disable the mouse over behavior of a collapsed RadPane so it does not show unless directly clicked on (this is also the behavior the Visual Studio dock control has).
  3. Is there a way to allow the user to reorder the RadPane(s), within the same group, by dragging the tab? (this is also the behavior the Visual Studio dock control has).

 

0
Kalin
Telerik team
answered on 17 Jul 2015, 09:08 AM
Hi Eric,

What I can suggest you for the first question would be to manually activate the needed Pane once all the Panes are Pinned. At the first time the Pin event is fired you can check the pinned.PaneGroup.Items.Count - the event will be also fired for each of the panes inside of that collection, so you can wait until last call and manually activate the first Pinned Pane by setting its IsActive property.

As for the other questions:

1. You can reorder unpinned Panes as demonstrated in the following demo from our XAML SDK repository:
https://github.com/telerik/xaml-sdk/tree/master/Docking/OrderedUnpinnedPanes
2. By using custom FlyoutBehavior you could achieve that:
https://github.com/telerik/xaml-sdk/tree/master/Docking/ClickFlyoutBehaviorWithAnimation
3. By setting the AllowDragReorder property of the Docking to True the user will be able to drag reorder the Panes.

Hope this helps.

Regards,
Kalin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Eric
Top achievements
Rank 1
answered on 22 Jul 2015, 03:15 PM

HI Kalin,

Thanks for the reply. I took a look at the OrderedUnpinnedPanes code on github and I don't feel like that is a valid solution. That sample shows the Linq OrderBy extension which creates a new totally new collection and the code also shows adding and removing panes from the PaneGroup collection. It also looks like its ordering alphabetically based on the header name. Our panes are defined by the PanesSource, which is a collection of ViewModels, and I do not think modifying the underlying pane collection this way seems very stable. I would be worried that the DataContext would be changed as well.

Again I think this is behavior that should be part of any docking control that is based off of the Visual Studio docking environment. The Telerik RadDocking control should support the following out of the box.

 1. When one RadPane is pinned/unpinned all other RadPanes in the same group should be pinned/unpinned.  (you already added an enhancement request for this. Thank you).

2. When #1 above is applied the order of the panes when pinned/unpinned should match their order when pinned/unpinned.

The custom FlyoutBehavior looks interesting. I am still playing around with that and the AllowDragReorder worked. I guess I simply missed that property when looking through the help.

0
Kalin
Telerik team
answered on 27 Jul 2015, 10:25 AM
Hello Eric,

I would like to thank you for your feedback - it will be considered once the item is planned for implementation. I understand your concerns regarding the OrderedUnpinnedPanes example and I'm sorry it is not suitable for you - you can try to use same approach but to depend on another property responsible for the current index of the Pane. Please follow the Feedback item regarding that feature request in order to get notified once its status is changed.

If you have any other questions or concerns, please let us know.

Regards,
Kalin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Docking
Asked by
Eric
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Eric
Top achievements
Rank 1
Share this question
or