Approved
Last Updated: 03 Jan 2017 20:49 by ADMIN
ADMIN
Telerik Admin
Created on: 22 Mar 2012 12:15
Category: Docking
Type: Bug Report
1
Docking: SelectedIndex property in the save layout doesn't respect the hidden panes.
Possible work-around of this problem:

private void RadDocking_ElementLoaded ( object sender, LayoutSerializationEventArgs e )
 {
     if ( e.AffectedElement is RadPaneGroup )
     {
         var PaneGroup = e.AffectedElement as RadPaneGroup;
         var Panes = PaneGroup.EnumeratePanes().ToList();
         var SelectedIndex = PaneGroup.SelectedIndex;

         for ( int Index = 0; Index < Panes.Count; Index++ )
         {
             if ( ( Panes[ Index ].IsHidden || !Panes[ Index ].IsPinned ) && Index <= SelectedIndex )
             {
                 SelectedIndex++;
             }
         }

         PaneGroup.SelectedIndex = SelectedIndex;
     }
 }
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments