What exactly do these methods do? When I call either of them nothing seems to happen.
I have a PaneGroup with two panes. If the user clicks Pin on the first one, and then clicks Pin on the second one, they become tabbed.
What properties or methods do I need to set in order to create the same effect? I'm subscribing to the Dock.Pin/Unpin events and the set all of the panes in the pane group accordingly. If they pin one, I want them all to be pinned, not collapsed, and tabbed. If they unpin one, I want them all unpinned and collapsed.
7 Answers, 1 is accepted
The UnpinAllPanes and PinAllPanes methods of any RadPaneGroup correspondingly unpin or pin all of that group's RadPane instances. Note that only RadPane instances that are docked outside of the DocumentHost of the control and are not floating can be pinned or unpinned. When Panes are in the DocumentHost or are made floating the pin and unpin features are no longer possible.
I created and attached a sample project for you in which the mentioned methods work as expected. Please let us know if we have missed something.
I apologize for missing that detail. When using the described methods in order to pin or unpin all RadPane instances of a RadPaneGroup inside the Unpin/Pin events you will need to wrap the call with a Dispatcher. When a RadPane is being unpinned/pinned there is an animation that is triggered. Since the call of the PinAllPanes/UnpinAllPanes methods is immediately inside the Pin/Unpin events which are executed before the animation has completed there is a timing issue that is resolved by warping the call with a Dispatcher.
The next code snippet shows how to achieve the described behavior in those events:
Hope this is helpful.
Thanks again for your help!!
Getting Closer; this is almost perfect. Using the dispatcher to Pin/Unpin the panes achieves the behavior I'm looking for. However, there are two issues I'm seeing.
1. After unpinning, one of the flyouts will repeatedly and very quickly start opening and closing and there is nothing you can do to stop it. I have only seen this happen twice.
2. After unpinning, all of the panes in the group fail to activate/flyout when the mouse is over them. The tab will "highlight" like it's about to flyout, but it never does. The number of times you have to pin/unpin before it stops responding varies, but eventually they stop responding.
After researching the described issues it looks like using the UnpinAllPanes/PinAllPanes methods in the corresponding events of the control is not bulletproof and may lead to unexpected behavior. We logged the issue in our feedback portal where you can track its status. Because the UnpinAllPanes method unpins all of the RadPane instances it is causing the Unpin event of the control to be triggered for each pane and when there is a call for the UnpinAllPanes in that event it is called multiple times on the same instances which corrupts the expected unpin action in the control. The above is valid for the PinAllPanes method also.
I updated your Telerik points for bringing this to our attention. We will do our best to have a fix for it as soon as possible.
My questions are:
1. Is the MouseOver event that activates the flyout adversely affected by the internal telerik code that you mention above as not being bulletproof?
2. Do you even suggest being able to pin/unpin all panes on the fly at runtime?
3. If other unintended consequences are found, should I continue to try to make this work, or remove the functionality until the issue is properly addressed by the Dock/Pane control(s)?
Thanks for your help!!!
Thank you for sharing with us the implementation of the possible solution to the previously described issues. As the issue is a strange one that is caused by a rapid events triggering we cannot confirm that the described CanUserPin toggling is an bulletproof approach that will not lead to any other unexpected behaviors in the control. Initially the UnpinAllPanes/PinAllPanes methods were implemented to provide an way to unpin/pin all RadPanes of a RadPaneGroup when implementing such feature that is triggered outside of the control. Inside the control the unpin/pin functionality is handled by each RadPane's unpin/pin button. Since the Unpin/Pin events of the control are called for each RadPane instance using a method inside those events that explicitly triggers them is not something that we anticipated when initially implementing those methods.
As we see that this is an approach that many of our users would like to use we will do our best to fix the related with it issues. One approach with which the mentioned behavior could be implemented without the use of the events is to customize the PaneHeaderStyle and in its Template replace the built-in unpin/pin buttons with buttons that call a custom ICommand which uses the methods.
I created and attached a sample project for you of the described approach. We apologize for any inconvenience that this may be causing.