What I would like to do is to reorder the flyout tabs that are shown each the 'AfterPaneButtonClick' event is raised. Flyout tabs on the top would sort with other flyout tabs on the top, left with left, and so on. The idea is to impose an order on the flyout tabs.
Do you have any example code that shows how to do this?
Patrick
Here's the project you gave to me. In it I've shown how I re-sort the tabs.
Georgi;
Based on what I need, and my understanding the pin, and then un-pin, behavior of the tabs, here's code that does what I need it to do: re-sort the dock area according to the text shown in the dock area:
-----
Dim mustBeFirstPanel As DockableControlPane = UltraDockManager1.PaneFromControl(Label1) Dim mustBeSecondPanel As DockableControlPane = UltraDockManager1.PaneFromControl(Label2) Dim otherPanels As Generic.List(Of KeyValuePair(Of String, DockableControlPane)) = (From otherPanel As DockableControlPane In UltraDockManager1.ControlPanes _ Where ((otherPanel IsNot MustBeFirstPanel) AndAlso (otherPanel IsNot mustBeSecondPanel)) _ Order By otherPanel.Text Ascending _ Select New KeyValuePair(Of String, DockableControlPane)(otherPanel.Text.ToUpper, otherPanel)) _ .ToList() 'Now that we have our sorted list, we make sure that 'Demos' is at the top of it so this it'll be next to 'Project' If ((mustBeSecondPanel IsNot Nothing) AndAlso Not (mustBeSecondPanel.Pinned)) Then otherPanels.Insert(0, New KeyValuePair(Of String, DockableControlPane)(mustBeSecondPanel.Text.ToUpper, mustBeSecondPanel)) End If If ((MustBeFirstPanel IsNot Nothing) AndAlso Not (MustBeFirstPanel.Pinned)) Then otherPanels.Insert(0, New KeyValuePair(Of String, DockableControlPane)(MustBeFirstPanel.Text.ToUpper, MustBeFirstPanel)) End If For Each tmpEntry As KeyValuePair(Of String, DockableControlPane) In otherPanels With tmpEntry.Value .Tag = .Pinned .Pinned = True End With Next For Each tmpEntry As KeyValuePair(Of String, DockableControlPane) In otherPanels With tmpEntry.Value .Pinned = CBool(.Tag) End With Next
MustBeFirst & Second are just that. Everyone elese sorts by text. Any panel already pinne4d stays that way, and unpinned tabs sort around them.
Pat
Thank you for the updated example. I picked up the 12.2 stuff, and this example works.
I think I see part of the problem. The example produces an effect, so long as the panes are pinned. In the example you sent, if 'UltraExplorerBar1' is un-pinned, the re-position fails. (nothing happens)
In actuality, the case I am trying to solve is closer to then two tabs shown in the example, 'UltraGauge1' and 'UltraGauge2'. My task is to try and resort 'UltraGauge1' and 'UltraGauge2' into a set order after either 'UltraGauge1' or 'UltraGauge2' is changed from pinned to un-pinned. In my case, however, I can pin/un-pin each of the 'UltraGauge' tabs independently - because I use multiple DockAreas, not multiple panes in a dock area.
So, this example will move the DockAreas around, so long as they're pinned. Is there a way to move the DockAreas that are un-pinned?
Hello Patrick,
Here is the new sample with version 12.1 and VB
Let me know if you have any questions.
Regards
Tried the project, but it was looking for the 11.2 version of Infragistics. When I deleted those references in order to add references to 12.1, VS2010 crashes. Turned off what extensions I could, to no effect.
Could you pass this back to me with references to Infragistics v12.1, please? Even better would be this done over in VB.
TIA;