Re arrange the Rad pan in Rad docking panel

5 posts, 0 answers
  1. Vivek
    Vivek avatar
    4 posts
    Member since:
    Dec 2011

    Posted 03 Feb 2012 Link to this post

    Hi ,
    i am using rad docking panel and inside it i am using the same Rad Panel Group and Rad pane.. i do the arrangement in some way like http://www.telerik.com/help/silverlight/raddocking-panes-radpane.html (its is just example but get you quick understanding).

    Now issue  is that suppose i move the pane(s) here and there an mixed the layout. so i want one button at top (as pane are in user control and there is one  main page above called as Shell as i am using MVVM architecture).

    so when user will Click on that button called as Reset layout . it will set all the panes in the starting layout. i searched on form but not get any relevant information.

    With Regards
    Vivek K Shrivastava


  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 06 Feb 2012 Link to this post

    Hello Vivek,

    I would suggest to use SaveLayout/LoadLayout methods of the Docking control.  You can check our online example demonstrating this functionality here and the documentation here.

    Hope this helps.

    Greetings,
    Yana
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Vivek
    Vivek avatar
    4 posts
    Member since:
    Dec 2011

    Posted 07 Feb 2012 Link to this post

    HI Yana ,
    Thanks that is working for me ..
  5. Vivek
    Vivek avatar
    4 posts
    Member since:
    Dec 2011

    Posted 07 Feb 2012 Link to this post

    Hi Yana,

     There is one issue is coming . Re-Arrange issue is fixed. the event associated to the main docking panel is going blank. The XML file that is storingin Isolated storeage on Save Layout is  below :
    <?xml version="1.0" encoding="utf-8"?><RadDocking><SplitContainers><RadSplitContainer Dock="DockedTop"><Items><RadSplitContainer Orientation="Horizontal"><Items><RadSplitContainer Orientation="Horizontal"><Items><RadPaneGroup SelectedIndex="0"><Items><RadPane SerializationTag="ControlSet" IsPinned="True" IsDockable="True" Title="Controller Settings" Header="Controller Settings" CanUserClose="False" /><RadPane SerializationTag="OpSchedule" IsPinned="True" IsDockable="True" Title="Operating Schedule" Header="Operating Schedule" CanUserClose="False" /><RadPane SerializationTag="CalHist" IsPinned="True" IsDockable="True" Title="Calibration History" Header="Calibration History" CanUserClose="False" /><RadPane SerializationTag="Eventlog" IsPinned="True" IsDockable="True" Title="Event Log" Header="Event Log" CanUserClose="False" /><RadPane SerializationTag="CalLog" IsPinned="True" IsDockable="True" Title="Calculation Log" Header="Calculation Log" CanUserClose="False" /></Items></RadPaneGroup></Items></RadSplitContainer></Items></RadSplitContainer></Items></RadSplitContainer></SplitContainers></RadDocking>></Items></RadPaneGroup></Items></RadSplitContainer><RadSplitContainer InitialPosition="FloatingDockable" FloatingWidth="220" FloatingHeight="300" FloatingX="495" FloatingY="409" IsInOpenWindow="True" RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True"><Items><RadPaneGroup RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True" SelectedIndex="0"><Items><RadPane SerializationTag="CalHist" IsPinned="True" IsDockable="True" Title="Calibration History" Header="Calibration History" CanUserClose="False" /></Items></RadPaneGroup></Items></RadSplitContainer><RadSplitContainer InitialPosition="FloatingDockable" FloatingWidth="220" FloatingHeight="300" FloatingX="1155" FloatingY="549" IsInOpenWindow="True" RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True"><Items><RadPaneGroup RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True" SelectedIndex="0"><Items><RadPane SerializationTag="CalLog" IsPinned="True" IsDockable="True" Title="Calculation Log" Header="Calculation Log" CanUserClose="False" /></Items></RadPaneGroup></Items></RadSplitContainer></SplitContainers></RadDocking>

     but if you see the XMAL in code it have the Event associated so that on loading the saved layout, Event is not getting Invoke
    <telerik:RadDocking AllowUnsafeMode="True" HasDocumentHost="False" x:Name="raddock">
                <telerik:RadSplitContainer InitialPosition="DockedTop" >               
                    <telerik:RadSplitContainer Orientation="Horizontal">
                        <telerik:RadSplitContainer Orientation="Horizontal" >
                            <telerik:RadPaneGroup  SelectionChanged="RadPaneGroup_SelectionChanged" Name="MainRadPan" MouseLeftButtonUp="MainRadPan_MouseLeftButtonUp">
                                <telerik:RadPane Header="Controller Settings" CanUserClose="False" IsPinned="True" x:Name="ControlSet"  telerik:RadDocking.SerializationTag="ControlSet">
                                    <ScrollViewer>
                                        <Grid x:Name="InnerContent">
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="*"></RowDefinition>
                                                <RowDefinition Height="*"></RowDefinition>      
                                            </Grid.RowDefinitions>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition></ColumnDefinition>
                                                <ColumnDefinition></ColumnDefinition>
                                            </Grid.ColumnDefinitions>
                                            <Border  BorderBrush="White" BorderThickness="1" Grid.Row="0" Grid.Column="0" Margin="10,10,10,10" VerticalAlignment="Center" HorizontalAlignment="Center">
                                                <my:CWAnalogInOutContrSettings />
                                            </Border>
                                            <Border  BorderBrush="White" BorderThickness="1" Grid.Row="0" Grid.Column="1"  Margin="10,10,10,10" VerticalAlignment="Center" HorizontalAlignment="Center">
                                                <my:CWDigitialInContrSettings />
                                            </Border>
                                            <Border  BorderBrush="White" BorderThickness="1" Grid.Row="1" Grid.ColumnSpan="2"  Margin="10,10,10,10" VerticalAlignment="Center" HorizontalAlignment="Center">
                                                <my:RelayControlView />
                                            </Border>
     
                                        </Grid>
                                    </ScrollViewer>
                                </telerik:RadPane>
     
                                <telerik:RadPane Header="Operating Schedule" CanUserClose="False" IsPinned="True" x:Name="OpSchedule"   telerik:RadDocking.SerializationTag="OpSchedule">
                                   <my:CWOperatingSchedule />
                                </telerik:RadPane>
     
                                <telerik:RadPane Header="Event Log"  CanUserClose="False" IsPinned="True" x:Name="Eventlog"   telerik:RadDocking.SerializationTag="Eventlog">
                                   <my:EventLogCWView />
                                </telerik:RadPane>
     
                                <telerik:RadPane Header="Calculation Log"  CanUserClose="False" IsPinned="True" x:Name="CalLog" telerik:RadDocking.SerializationTag="CalLog">
    <my:CalculatedLogCWView />
                                </telerik:RadPane>
                                <telerik:RadPane Header="Calibration History" CanUserClose="False" IsPinned="True" x:Name="CalHist" telerik:RadDocking.SerializationTag="CalHist">
                                 <my:CalibrationHistoryView />
                                </telerik:RadPane>
                                 
                            </telerik:RadPaneGroup>
                        </telerik:RadSplitContainer>
     
                    </telerik:RadSplitContainer>
                </telerik:RadSplitContainer>
            </telerik:RadDocking>

    Regards
     Vivek

  6. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 10 Feb 2012 Link to this post

    Hello,

    In order for your events to work after Loading the Layout you should set Serialization Tag to the RadPaneGroup with the events. The logic of that is that if Serialization Tag is not set, the element is created again and the events are lost.

    Let us know if you have further questions.

    Greetings,
    Boyan
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top
DevCraft banner