Problem with loading Layout

13 posts, 0 answers
  1. Andi
    Andi avatar
    39 posts
    Member since:
    Aug 2010

    Posted 12 Jan 2011 Link to this post

    Hi there,

    I save the docking layout while closing the application

    private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
    {
      FileStream saveStream = new FileStream("usrLayout.xml", FileMode.OpenOrCreate);
      radDocking1.SaveLayout(saveStream);
      saveStream.Close();
    }

    and I want to load this Layout when the application is startet the next time. I do so in the Loaded-Event of the Docking-tool

    private void radDocking1_Loaded(object sender, RoutedEventArgs e)
    {
      if (File.Exists("usrLayout.xml"))
      {
        Stream loadStream = new FileStream("usrLayout.xml", FileMode.Open);
        loadStream.Seek(0, SeekOrigin.Begin);
        this.radDocking1.LoadLayout(loadStream);
        loadStream.Close();
      }
    }

    The Layout seems to be loaded correctly but all Panels are now empty. For example: I have in one of the Panels a TreeView but after using my loading-Method the TreeView is not shown in the panel.

    Any idea what I do wrong?

    Greetings
    Andi
  2. Andi
    Andi avatar
    39 posts
    Member since:
    Aug 2010

    Posted 13 Jan 2011 Link to this post

    I have tried this

    private void radDocking1_ElementLoading(object sender, LayoutSerializationLoadingEventArgs e)
    {
      var pane = e.AffectedElement as RadPane;
      if (pane != null)
      {
        pane.Content = this.GetPaneContent(e.AffectedElementSerializationTag);
      }
    }
     
    private object GetPaneContent(string p)
    {
      object returnWert = null;
      switch (p)
      {
        case "ExplorerPane":
          returnWert = this.treeView1;
          break;
      }
      return returnWert;
    }

    but it does not help. The Treeview will not be shown in the pane

    This is how I defined the Pane:

    <telerik:RadPane x:Name="Pane3" Header="ICConf Explorer"
        telerik:RadDocking.SerializationTag="ExplorerPane">
        <nav:RadTreeView  HorizontalAlignment="Stretch"  Name="treeView1" VerticalAlignment="Stretch" IsLineEnabled="True" FontFamily="Segoe UI" FontSize="12"
              ImagesBaseDir="/ICConfPrototyp;component/Images/png/" IsDragPreviewEnabled="False" MouseRightButtonDown="treeView1_MouseRightButtonDown" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" IsEditable="False" IsExpandOnDblClickEnabled="True" IsExpandOnSingleClickEnabled="False" MouseDoubleClick="treeView1_MouseDoubleClick">
            <nav:RadContextMenu.ContextMenu>
                <nav:RadContextMenu Closed="RadContextMenu_Closed" FontFamily="Calibri" FontSize="11" Opened="RadContextMenu_Opened" Name="cmTree">
                    <nav:RadMenuItem Header="Auschneiden" Name="cmTreeCut" >
                        <nav:RadMenuItem.Icon>
                            <Image Source="/ICConfPrototyp;component/Images/ico/cut.ico" Stretch="UniformToFill" />
                        </nav:RadMenuItem.Icon>
                    </nav:RadMenuItem>                                                    
                    <nav:RadMenuItem Header="Kopieren" Name="cmTreeCopy">
                        <nav:RadMenuItem.Icon>
                            <Image Source="/ICConfPrototyp;component/Images/ico/copy.ico" Stretch="UniformToFill" />
                        </nav:RadMenuItem.Icon>
                    </nav:RadMenuItem>
                    <nav:RadMenuItem Header="Einfügen" Name="cmTreePaste">
                        <nav:RadMenuItem.Icon>
                            <Image Source="/ICConfPrototyp;component/Images/ico/paste.ico" Stretch="UniformToFill" />
                        </nav:RadMenuItem.Icon>
                    </nav:RadMenuItem>
                    <nav:RadMenuItem IsSeparator="True" />
                    <nav:RadMenuItem Header="Neu" Name="cmTreeNew" Click="cmTreeNew_Click" />
                    <nav:RadMenuItem Header="Umbenennen" Name="cmTreeRename"/>
                    <nav:RadMenuItem Header="Löschen" Name="cmTreeDelete"/>
                    <nav:RadMenuItem IsSeparator="True" />
                    <nav:RadMenuItem Header="Öffnen" Name="cmTreeOpen" Click="cmTreeOpen_Click" />
                    <nav:RadMenuItem Header="Aktualisieren" Name="cmTreeRefresh"/>
                    <nav:RadMenuItem IsSeparator="True" />
                    <nav:RadMenuItem Header="Browser" Name="cmTreeBrowser"/>
                </nav:RadContextMenu>
            </nav:RadContextMenu.ContextMenu>
     
        </nav:RadTreeView>
    </telerik:RadPane>


    I have no more ideas :(
  3. UI for WPF is Visual Studio 2017 Ready
  4. Andi
    Andi avatar
    39 posts
    Member since:
    Aug 2010

    Posted 14 Jan 2011 Link to this post

    I have moved Layout loading to the Window_ContentRendered Method. The contents of the panes are still not shown except one where the content is a textblock. The text will be shown in the pane.

    No one there who can help me?


    This is the XAML of the whole window:
    <Window x:Class="ICConfPrototyp.MainWindow"
            xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"       
            xmlns:MyNamespace="clr-namespace:ICConfPrototyp"
            Title="ICConf" Height="538" Width="870" Icon="/ICConfPrototyp;component/Images/ico/icconf.ico" WindowState="Maximized" Closing="Window_Closing" ContentRendered="Window_ContentRendered">
     
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
     
            <!--Ribbon-->
            <telerik:RadRibbonBar HorizontalAlignment="Stretch" Name="MainRibbonBar" VerticalAlignment="Top" ApplicationName="ICConf Prototyp" telerik:StyleManager.Theme="Windows7">
     
                <!---QAT-->
                <telerik:RadRibbonBar.QuickAccessToolBar>
                    <telerik:QuickAccessToolBar>
                        <telerik:RadRibbonButton Text="Save" SmallImage="/Images/ico/Speichern.ico" Size="Small" />
                        <telerik:RadRibbonButton Text="Undo" SmallImage="/ICConfPrototyp;component/Images/Edit_UndoHS.png" Size="Small" />
                        <telerik:RadRibbonButton Text="Redo" SmallImage="/ICConfPrototyp;component/Images/Edit_RedoHS.png" Size="Small" />
                        <telerik:RadRibbonButton Text="Print" SmallImage="/ICConfPrototyp;component/Images/printer.png" Size="Small" />
                    </telerik:QuickAccessToolBar>
                </telerik:RadRibbonBar.QuickAccessToolBar>
     
                <!---RibbonTab ENTSCHEIDUNGSTABELLE  ET-->
                <telerik:RadRibbonTab Header="Entscheidungstabelle" Name="Entscheidungstabelle" BorderBrush="#FF51AAE2" Height="96">
     
                    <!--Gruppe ET-Zwischenablage-->
                    <telerik:RadRibbonGroup Header="Zwischenablage" telerik:ScreenTip.Title="Zwischenablage"
                            telerik:ScreenTip.Description="Zwischenablage-Aktionen"
                            telerik:ScreenTip.Icon="/ICConfPrototyp;component/Images/ico/paste.ico"
                            Icon="/ICConfPrototyp;component/Images/ico/paste.ico" Name="ET_Zwischenablage">
     
                        <telerik:RadRibbonGroup.Variants>
                            <telerik:GroupVariant Variant="Medium" Priority="0" />
                        </telerik:RadRibbonGroup.Variants>
     
                        <telerik:RadRibbonSplitButton Text="Einfügen"
                                SmallImage="/ICConfPrototyp;component/Images/ico/paste.ico"
                                LargeImage="/ICConfPrototyp;component/Images/ico/paste_32X32.ico" Size="Large"
                                telerik:ScreenTip.Title="Einfügen"
                                telerik:ScreenTip.Description="Aus Zwischenablage einfügen." Click="RadRibbonSplitButton_Click" Name="ET_Einfuegen">
     
                            <telerik:RadRibbonSplitButton.DropDownContent>
                                <telerik:RadContextMenu BorderThickness="0" Name="cmEinfuegen">
     
                                    <telerik:RadMenuItem Header="Einfügen" >
                                        <telerik:RadMenuItem.Icon>
                                            <Image Stretch="None" Source="/Images/paste.png" />
                                        </telerik:RadMenuItem.Icon>
                                    </telerik:RadMenuItem>
     
                                    <telerik:RadMenuItem Header="Einfügen Spezial..." >
                                        <telerik:RadMenuItem.Icon>
                                            <Image Stretch="None" Source="/ICConfPrototyp;component/Images/Paste.png" />
                                        </telerik:RadMenuItem.Icon>
                                    </telerik:RadMenuItem>
     
                                    <telerik:RadMenuItem Header="Paste as Hyperlink" IsEnabled="False">
                                        <telerik:RadMenuItem.Icon>
                                            <Image Stretch="None"
                                               Source="/ICConfPrototyp;component/Images/paste.png" />
                                        </telerik:RadMenuItem.Icon>
                                    </telerik:RadMenuItem>
     
                                </telerik:RadContextMenu>
     
                            </telerik:RadRibbonSplitButton.DropDownContent>
     
                        </telerik:RadRibbonSplitButton>
     
                        <StackPanel >
                            <telerik:RadRibbonButton Text="Ausschneiden" SmallImage="/ICConfPrototyp;component/Images/ico/cut.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Ausschneiden"
                                    telerik:ScreenTip.Description="Markierter Text in die Zwischenablage ausschneiden."
                                    />
                            <telerik:RadRibbonButton Text="Kopieren" SmallImage="/ICConfPrototyp;component/Images/ico/copy.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Copy"
                                    telerik:ScreenTip.Description="Copy the selection and put it on the Clipboard."
                                    />
                        </StackPanel>
     
                    </telerik:RadRibbonGroup>
     
                    <!--Gruppe ET-EntscheidungsTabelle-->
                    <telerik:RadRibbonGroup Header="Entscheidungstsabelle" telerik:ScreenTip.Title="Entscheidungstsabelle"
                            telerik:ScreenTip.Description="Entscheidungstsabellen Optionen."
                            telerik:ScreenTip.Icon="/ICConfPrototyp;component/Images/book_reportHS.png"
                            Icon="/ICConfPrototyp;component/Images/book_reportHS.png" Width="Auto" Name="ET_Entscheidungstabelle">
     
                        <telerik:RadRibbonGroup.Variants>
                            <telerik:GroupVariant Variant="Large" Priority="0" />
                        </telerik:RadRibbonGroup.Variants>
     
                        <!--<telerik:RadRibbonButton Text="Speichern" SmallImage="/ICConfPrototyp;component/Images/Speichern_32x32.ico" LargeImage="/ICConfPrototyp;component/Images/Speichern_32x32.ico"
                                    CollapseToSmall="WhenGroupIsSmall" telerik:ScreenTip.Title="Speichern"
                                    telerik:ScreenTip.Description="Speichern." Name="ET_Speichern" Click="ET_Speichern_Click" 
                                    VerticalAlignment="Top" Background="Transparent" BorderBrush="Transparent" BorderThickness="0"/>-->
     
                        <!--<Button VerticalAlignment="Top" Background="Transparent" BorderBrush="Transparent" BorderThickness="0" >
                            <Image Source="/ICConfPrototyp;component/Images/Speichern_32x32.ico" Stretch="None" Height="32" Width="32"></Image>
                        </Button>-->
                        <telerik:RadRibbonButton Text="Speichern" SmallImage="/ICConfPrototyp;component/Images/ico/Speichern.ico"  LargeImage="/ICConfPrototyp;component/Images/ico/Speichern_32x32.ico"
                                                Size="Large"
                                                CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Speichern."
                                                telerik:ScreenTip.Description="Speichern."
                        />
     
                        <telerik:RadWrapPanel Orientation="Vertical">
                            <telerik:RadRibbonButton Text="Prüfen" SmallImage="/ICConfPrototyp;component/Images/ico/Pruefen.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Prüfen"
                                    telerik:ScreenTip.Description="..." Name="ET_Pruefen" Height="24" Width="Auto" />
                            <telerik:RadRibbonButton Text="opt. Darstellung" SmallImage="/ICConfPrototyp;component/Images/ico/Optimale_Darstellung.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Optimale Darstellung"
                                    telerik:ScreenTip.Description="..." Name="ET_OptimaleDarstellung" Height="24" Width="Auto" />
                            <telerik:RadRibbonButton Text="Notiz"
                                    SmallImage="/ICConfPrototyp;component/Images/ico/Notiz.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Notiz"
                                    telerik:ScreenTip.Description="..." Name="ET_Notiz" Height="24" Width="Auto" />
                            <telerik:RadRibbonButton Text="Suchen"
                                    SmallImage="/ICConfPrototyp;component/Images/ico/Suchen.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Suchen"
                                    telerik:ScreenTip.Description="..." Name="ET_Suchen" Height="24" Width="Auto" />
                            <telerik:RadRibbonButton Text="Ersetzen"
                                    SmallImage="/ICConfPrototyp;component/Images/ico/Ersetzen.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Ersetzen"
                                    telerik:ScreenTip.Description="..." Name="Ersetzen" Height="24" Width="Auto" />
                        </telerik:RadWrapPanel>
     
                    </telerik:RadRibbonGroup>
     
                    <!--Gruppe ET-Parameter-->
                    <telerik:RadRibbonGroup Header="Parameter" telerik:ScreenTip.Title="Parameter"
                            telerik:ScreenTip.Description="Parameter Optionen."
                            telerik:ScreenTip.Icon="/ICConfPrototyp;component/Images/book_reportHS.png"
                            Icon="/ICConfPrototyp;component/Images/book_reportHS.png" Width="Auto" Name="ET_Parameter">
     
                        <telerik:RadRibbonGroup.Variants>
                            <telerik:GroupVariant Variant="Large" Priority="0" />
                        </telerik:RadRibbonGroup.Variants>
     
                        <StackPanel>
     
                            <telerik:RadRibbonButton Text="Übergabeparameter" SmallImage="/ICConfPrototyp;component/Images/ico/Parameter_Uebergabe.ico" LargeImage="/ICConfPrototyp;component/Images/ico/Parameter_Uebergabe_32x32.ico"
                                    CollapseToSmall="WhenGroupIsSmall" telerik:ScreenTip.Title="Übergabeparameter"
                                    telerik:ScreenTip.Description="..." Name="ET_Para_UebergabeParameter" />
                            <telerik:RadRibbonButton Text="Lokale ET-Parameter" SmallImage="/ICConfPrototyp;component/Images/ico/Parameter.ico" LargeImage="/ICConfPrototyp;component/Images/ico/Parameter_32x32.ico"
                                    CollapseToSmall="WhenGroupIsSmall" telerik:ScreenTip.Title="Lokale Parameter"
                                    telerik:ScreenTip.Description="..." Name="ET_Para_LokaleParameter" />
     
                        </StackPanel>
     
                    </telerik:RadRibbonGroup>
     
                    <!--Gruppe ET-Zeilen und Spalten-->
                    <telerik:RadRibbonGroup Header="Zeilen  und Spalten" telerik:ScreenTip.Title="Zeilen und Spalten"
                            telerik:ScreenTip.Description="Zeilen und Spalten Optionen."
                            telerik:ScreenTip.Icon="/ICConfPrototyp;component/Images/book_reportHS.png"
                            Icon="/ICConfPrototyp;component/Images/book_reportHS.png" Width="Auto" Name="ET_ZeilenSpalten">
     
                        <telerik:RadRibbonGroup.Variants>
                            <telerik:GroupVariant Variant="Large" Priority="0" />
                        </telerik:RadRibbonGroup.Variants>
     
                        <telerik:RadRibbonButton Name="DarüberEinfuegen" Text="Darüber einfügen" SmallImage="/ICConfPrototyp;component/Images/ico/Zeilen_oberhalb.ico"  LargeImage="/ICConfPrototyp;component/Images/ico/Zeilen_oberhalb_32x32.ico"
                                                Size="Large"
                                                CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Darüber einfügen"
                                                telerik:ScreenTip.Description="Darüber einfügen."
                        />
     
                        <telerik:RadWrapPanel Orientation="Vertical">
                            <telerik:RadRibbonButton Text="Spalte links einfügen" SmallImage="/ICConfPrototyp;component/Images/ico/Spalten_links.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Spalte Links Einfügen"
                                    telerik:ScreenTip.Description="..." Name="SpalteLinksEinfuegen" Height="24" Width="Auto" />
                            <telerik:RadRibbonButton Text="Spalte rechts einfügen" SmallImage="/ICConfPrototyp;component/Images/ico/Spalten_rechts.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Spalte Rechts Einfügen"
                                    telerik:ScreenTip.Description="..." Name="SpalteRechtsEinfuegen" Height="24" Width="Auto" />
                            <telerik:RadRibbonButton Text="Zeile darunter einfügen" SmallImage="/ICConfPrototyp;component/Images/ico/Zeilen_unterhalb.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Zeile darunter Einfügen"
                                    telerik:ScreenTip.Description="..." Name="ZeileDarunterEinfuegen" Height="24" Width="Auto" />
                            <telerik:RadRibbonButton Text="Spalte löschen" SmallImage="/ICConfPrototyp;component/Images/ico/Spalte_loeschen.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Spalte löschen"
                                    telerik:ScreenTip.Description="..." Name="SpalteLoeschen" Height="24" Width="Auto" />
                            <telerik:RadRibbonButton Text="Zeile löschen" SmallImage="/ICConfPrototyp;component/Images/ico/Zeile_loeschen.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Zeile löschen"
                                    telerik:ScreenTip.Description="..." Name="ZeileLoeschen" Height="24" Width="Auto" />
                            <telerik:RadRibbonButton Text="Ansicht fixieren" SmallImage="/ICConfPrototyp;component/Images/ico/Ansicht_fixieren.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Ansicht fixieren"
                                    telerik:ScreenTip.Description="..." Name="AnsichtFixieren" Height="24" Width="Auto" />
                        </telerik:RadWrapPanel>
     
                    </telerik:RadRibbonGroup>
     
                </telerik:RadRibbonTab >
     
                <!--- TODO: RibbonTab PARAMETER - PARA-->
                <telerik:RadRibbonTab Header="Parameter" Name="Parameter">
     
                    <telerik:RadRibbonGroup Header="Zwischenablage" telerik:ScreenTip.Title="Zwischenablage"
                            telerik:ScreenTip.Description="Zwischenablage-Aktionen"
                            telerik:ScreenTip.Icon="/ICConfPrototyp;component/Images/Paste.png"
                            Icon="/ICConfPrototyp;component/Images/paste.png" Name="Para_Zwischenablage">
     
                        <telerik:RadRibbonGroup.Variants>
                            <telerik:GroupVariant Variant="Medium" Priority="0" />
                        </telerik:RadRibbonGroup.Variants>
     
                        <telerik:RadRibbonSplitButton Text="Einfügen"
                                SmallImage="/ICConfPrototyp;component/Images/ico/paste.ico"
                                LargeImage="/ICConfPrototyp;component/Images/ico/paste_32X32.ico" Size="Large"
                                telerik:ScreenTip.Title="Einfügen"
                                telerik:ScreenTip.Description="Aus Zwischenablage einfügen." Click="RadRibbonSplitButton_Click" Name="Einfuegen">
     
                            <telerik:RadRibbonSplitButton.DropDownContent>
                                <telerik:RadContextMenu BorderThickness="0">
     
                                    <telerik:RadMenuItem Header="Einfügen" >
                                        <telerik:RadMenuItem.Icon>
                                            <Image Stretch="None" Source="/Images/paste.png" />
                                        </telerik:RadMenuItem.Icon>
                                    </telerik:RadMenuItem>
     
                                    <telerik:RadMenuItem Header="Einfügen Spezial..." >
                                        <telerik:RadMenuItem.Icon>
                                            <Image Stretch="None" Source="/ICConfPrototyp;component/Images/Paste.png" />
                                        </telerik:RadMenuItem.Icon>
                                    </telerik:RadMenuItem>
     
                                    <telerik:RadMenuItem Header="Paste as Hyperlink" IsEnabled="False">
                                        <telerik:RadMenuItem.Icon>
                                            <Image Stretch="None"
                                                    Source="/ICConfPrototyp;component/Images/paste.png" />
                                        </telerik:RadMenuItem.Icon>
                                    </telerik:RadMenuItem>
     
                                </telerik:RadContextMenu>
     
                            </telerik:RadRibbonSplitButton.DropDownContent>
     
                        </telerik:RadRibbonSplitButton>
     
                        <StackPanel>
                            <telerik:RadRibbonButton Text="Ausschneiden" SmallImage="/ICConfPrototyp;component/Images/cutHS.png"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Ausschneiden"
                                    telerik:ScreenTip.Description="Markierter Text in die Zwischenablage ausschneiden."
                                    />
                            <telerik:RadRibbonButton Text="Kopieren" SmallImage="/ICConfPrototyp;component/Images/copy.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Copy"
                                    telerik:ScreenTip.Description="Copy the selection and put it on the Clipboard."
                                    />
                        </StackPanel>
                    </telerik:RadRibbonGroup>
     
                    <telerik:RadRibbonGroup Header="Globale-Parameter" telerik:ScreenTip.Title="Globale-Parameter"
                            telerik:ScreenTip.Description="..." >
     
                        <telerik:RadRibbonGroup.Variants>
                            <telerik:GroupVariant Variant="Large" Priority="0" />
                        </telerik:RadRibbonGroup.Variants>
     
                        <StackPanel>
                            <telerik:RadRibbonButton Text="globale Parameter bearbeiten" SmallImage="/ICConfPrototyp;component/Images/ico/Parameter_global.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="globale Parameter bearbeiten"
                                    telerik:ScreenTip.Description="..." Name="GlobaleParameterBearbeiten"
                                    />
                            <telerik:RadRibbonButton Text="Parametergruppe global zuordnen" SmallImage="/ICConfPrototyp;component/Images/ico/Parametergruppe_global_zuordnen.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Parametergruppe global zuordnen"
                                    telerik:ScreenTip.Description="..." Name="ParameterGruppeGlobalZuordnen"
                                    />
                        </StackPanel>
                    </telerik:RadRibbonGroup>
     
                    <telerik:RadRibbonGroup Header="Zeilen" telerik:ScreenTip.Title="Zeilen"
                            telerik:ScreenTip.Description="..." >
     
                        <telerik:RadRibbonGroup.Variants>
                            <telerik:GroupVariant Variant="Large" Priority="0" />
                        </telerik:RadRibbonGroup.Variants>
     
                        <telerik:RadRibbonButton Name="ParaZeileDarüberEinfuegen" Text="Darüber einfügen" SmallImage="/ICConfPrototyp;component/Images/ico/Zeilen_oberhalb.ico"  LargeImage="/ICConfPrototyp;component/Images/ico/Zeilen_oberhalb_32x32.ico"
                                                Size="Large"
                                                CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Darüber einfügen"
                                                telerik:ScreenTip.Description="Darüber einfügen."
                        />
                        <StackPanel>
                            <telerik:RadRibbonButton Text="Zeile darunter einfügen" SmallImage="/ICConfPrototyp;component/Images/ico/Zeilen_unterhalb.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="globale Parameter bearbeiten"
                                    telerik:ScreenTip.Description="..." Name="ParameterZeileDarunterEinfügen"
                                    />
                            <telerik:RadRibbonButton Text="Zeile löschen" SmallImage="/ICConfPrototyp;component/Images/ico/Zeile_loeschen.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Zeile löschen"
                                    telerik:ScreenTip.Description="..." Name="ParameterZeileLoeschen"
                                    />
                        </StackPanel>
                    </telerik:RadRibbonGroup>
     
                </telerik:RadRibbonTab >
                <telerik:RadRibbonTab Header="Ausführen" Name="Ausfuehren">
                    <telerik:RadRibbonGroup Header="Ausführen" telerik:ScreenTip.Title="Ausführen"
                            telerik:ScreenTip.Description="..." >
     
                        <telerik:RadRibbonGroup.Variants>
                            <telerik:GroupVariant Variant="Large" Priority="0" />
                        </telerik:RadRibbonGroup.Variants>
     
                        <StackPanel>
                            <telerik:RadRibbonButton Text="Ausführen" SmallImage="/ICConfPrototyp;component/Images/ico/Ausführen.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="globale Parameter bearbeiten"
                                    telerik:ScreenTip.Description="..." Name="ETAusfuehren"
                                    />
                            <telerik:RadRibbonButton Text="Ausführen im Trace-Modus" SmallImage="/ICConfPrototyp;component/Images/ico/Ausfuehren_trace.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Ausführen im Trace-Modus"
                                    telerik:ScreenTip.Description="..." Name="ETAusfuehrenTrace"
                                    />
                        </StackPanel>
                    </telerik:RadRibbonGroup>
                    <telerik:RadRibbonGroup Header="Start-ET festlegen" telerik:ScreenTip.Title="Start-ET festlegen"
                            telerik:ScreenTip.Description="..." >
     
                        <telerik:RadRibbonGroup.Variants>
                            <telerik:GroupVariant Variant="Large" Priority="0" />
                        </telerik:RadRibbonGroup.Variants>
     
                        <StackPanel Width="150">
                            <ComboBox Name="cmbVerbund" SelectedIndex="0" Width="125">
                                Verbund
                            </ComboBox>
                            <ComboBox Name="cmbVerbundgruppe" SelectedIndex="0" Width="125">
                                Verbundgruppe
                            </ComboBox>
                            <ComboBox Name="cmbET" SelectedIndex="0" Width="125">
                                Entscheidungstabelle
                            </ComboBox>
                        </StackPanel>
                    </telerik:RadRibbonGroup>
                </telerik:RadRibbonTab>
                <telerik:RadRibbonTab Header="Extra" Name="Extra" Height="96">
                    <telerik:RadRibbonGroup Header="Allgemein" telerik:ScreenTip.Title="Allgemein"
                            telerik:ScreenTip.Description="..." >
     
                        <telerik:RadRibbonGroup.Variants>
                            <telerik:GroupVariant Variant="Large" Priority="0" />
                        </telerik:RadRibbonGroup.Variants>
     
                        <telerik:RadWrapPanel Orientation="Vertical">
                            <telerik:RadRibbonButton Text="Verbund prüfen" SmallImage="/ICConfPrototyp;component/Images/ico/Pruefen.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Verbund prüfen"
                                    telerik:ScreenTip.Description="..." Name="VerbundPruefen"
                                    />
                            <telerik:RadRibbonButton Text="Verwaltung aktualisieren" SmallImage="/ICConfPrototyp;component/Images/ico/Verwaltung_aktualisieren.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Verwaltung aktualisieren"
                                    telerik:ScreenTip.Description="..." Name="VerwaltungAktualisieren"
                                    />
                            <telerik:RadRibbonButton Text="Import ODBC" SmallImage="/ICConfPrototyp;component/Images/ico/import_ODBC.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Import ODBC"
                                    telerik:ScreenTip.Description="..." Name="ImportODBC"
                                    />
                            <telerik:RadRibbonButton Text="Suchen" SmallImage="/ICConfPrototyp;component/Images/ico/suchen.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Suchen"
                                    telerik:ScreenTip.Description="..." Name="ExtraSuchen"
                                    />
                            <telerik:RadRibbonButton Text="Ersetzen" SmallImage="/ICConfPrototyp;component/Images/ico/ersetzen.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Ersetzen"
                                    telerik:ScreenTip.Description="..." Name="ExtraErsetzen"
                                    />
                        </telerik:RadWrapPanel>
                        <StackPanel>
                            <telerik:RadRibbonButton Text="Einstellungen" SmallImage="/ICConfPrototyp;component/Images/ico/Einstellungen.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Einstellungen"
                                    telerik:ScreenTip.Description="..." Name="Einstellungen" Click="Einstellungen_Click" />
                            <telerik:RadRibbonButton Text="ET als Prozedur" SmallImage="/ICConfPrototyp;component/Images/ico/ET_Prozedur.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="ET als Prozedur"
                                    telerik:ScreenTip.Description="..." Name="ETProzedur"
                                    />
                        </StackPanel>
                    </telerik:RadRibbonGroup>
                    <telerik:RadRibbonGroup Header="Assistenten" telerik:ScreenTip.Title="Assistenten"
                            telerik:ScreenTip.Description="..." >
     
                        <telerik:RadRibbonGroup.Variants>
                            <telerik:GroupVariant Variant="Large" Priority="0" />
                        </telerik:RadRibbonGroup.Variants>
     
                        <StackPanel>
                            <CheckBox Name="cbFunktionen" Content="Funktionen"/>
                            <CheckBox Name="cbParameter" Content="Parameter"/>
                            <CheckBox Name="cbParametergruppen" Content="Parametergruppen"/>
                            <CheckBox Name="cbExplorer" Content="Explorer"/>
                        </StackPanel>
                    </telerik:RadRibbonGroup>
                    <telerik:RadRibbonGroup Header="Dialoge" telerik:ScreenTip.Title="Dialoge"
                            telerik:ScreenTip.Description="..." >
     
                        <telerik:RadRibbonGroup.Variants>
                            <telerik:GroupVariant Variant="Large" Priority="0" />
                        </telerik:RadRibbonGroup.Variants>
     
                        <StackPanel>
                            <telerik:RadRibbonButton Text="Bearbeiten" SmallImage="/ICConfPrototyp;component/Images/ico/Dialog.ico"
                                    CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Title="Bearbeiten"
                                    telerik:ScreenTip.Description="..." Name="Bearbeiten"
                                    />
                        </StackPanel>
                    </telerik:RadRibbonGroup>
                </telerik:RadRibbonTab>
            </telerik:RadRibbonBar>
     
     
     
            <!--DOCKING-->
            <telerik:RadDocking Grid.Row="1" x:Name="radDocking1" Margin="1,0,-1,0" telerik:StyleManager.Theme="Office_Blue" Loaded="radDocking1_Loaded" ElementLoading="radDocking1_ElementLoading">
                <telerik:RadDocking.DocumentHost>
     
                    <telerik:RadSplitContainer>
                        <telerik:RadPaneGroup>
                            <telerik:RadDocumentPane Title="Beschreibung" Name="tabBrowser" Header="Browser" telerik:RadDocking.SerializationTag="BrowserPane">
                                <telerik:RadDocumentPane.Content>
                                    <TextBlock TextWrapping="Wrap"
                                                Text="On the Documents tab above press Ctrl + Mouse Left button to display the Popup Menu. You can use the same combination on every tab." />
                                </telerik:RadDocumentPane.Content>
                            </telerik:RadDocumentPane>
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
     
                </telerik:RadDocking.DocumentHost>
     
                <telerik:RadSplitContainer telerik:DockingPanel.InitialSize="250,150" MaxWidth="600"
                        Name="LeftContainer" InitialPosition="DockedLeft">
                    <telerik:RadPaneGroup x:Name="Group1">
                        <telerik:RadPane x:Name="Pane1" Header="Funktionen" telerik:RadDocking.SerializationTag="FunktionPane">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="60" />
                                    <RowDefinition Height="60" />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="163*" />
                                    <ColumnDefinition Width="169*" />
                                </Grid.ColumnDefinitions>
                                <ListBox HorizontalAlignment="Stretch" Name="lbLeft" VerticalAlignment="Stretch" SelectionChanged="lbLeft_SelectionChanged" KeyDown="lbLeft_KeyDown" FontFamily="Segoe UI" FontSize="12" />
                                <GridSplitter Grid.Column="0" Width="5" />
                                <ListBox Grid.Column="1" HorizontalAlignment="Stretch" Name="lbRight" VerticalAlignment="Stretch" VerticalContentAlignment="Center" SelectionChanged="lbRight_SelectionChanged" KeyDown="lbRight_KeyDown" FontFamily="Segoe UI" />
                                <GroupBox Grid.ColumnSpan="2" Header="Syntax" HorizontalAlignment="Stretch" Name="groupBox1" VerticalAlignment="Center" Grid.Row="1" >
                                    <TextBox Height="23" Name="txtSyntax" IsReadOnly="True" />
                                </GroupBox>
                                <GroupBox Grid.ColumnSpan="2" Header="Kurzbeschreibung" HorizontalAlignment="Stretch" Name="groupBox2" VerticalAlignment="Center" Grid.Row="2" >
                                    <TextBox Height="23" Name="txtKurzbeschreibung" IsReadOnly="True" />
                                </GroupBox>
                            </Grid>
                        </telerik:RadPane>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
     
                <telerik:RadSplitContainer telerik:DockingPanel.InitialSize="200,200" MaxWidth="679"
                        x:Name="RightContainer" InitialPosition="DockedRight" >
                    <telerik:RadPaneGroup x:Name="Group2" DropDownDisplayMode="Collapsed" HorizontalContentAlignment="Left" VerticalContentAlignment="Top">
                        <telerik:RadPane x:Name="Pane3" Header="ICConf Explorer"
                            telerik:RadDocking.SerializationTag="ExplorerPane">
                            <telerik:RadPane.Content>
                            <telerik:RadTreeView  HorizontalAlignment="Stretch"  Name="treeView1" VerticalAlignment="Stretch" IsLineEnabled="True" FontFamily="Segoe UI" FontSize="12"
                                  ImagesBaseDir="/ICConfPrototyp;component/Images/png/" IsDragPreviewEnabled="False" MouseRightButtonDown="treeView1_MouseRightButtonDown" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" IsEditable="False" IsExpandOnDblClickEnabled="True" IsExpandOnSingleClickEnabled="False" MouseDoubleClick="treeView1_MouseDoubleClick">
                                <telerik:RadContextMenu.ContextMenu>
                                    <telerik:RadContextMenu Closed="RadContextMenu_Closed" FontFamily="Calibri" FontSize="11" Opened="RadContextMenu_Opened" Name="cmTree">
                                        <telerik:RadMenuItem Header="Auschneiden" Name="cmTreeCut" >
                                            <telerik:RadMenuItem.Icon>
                                                <Image Source="/ICConfPrototyp;component/Images/ico/cut.ico" Stretch="UniformToFill" />
                                            </telerik:RadMenuItem.Icon>
                                        </telerik:RadMenuItem>
                                        <telerik:RadMenuItem Header="Kopieren" Name="cmTreeCopy">
                                            <telerik:RadMenuItem.Icon>
                                                <Image Source="/ICConfPrototyp;component/Images/ico/copy.ico" Stretch="UniformToFill" />
                                            </telerik:RadMenuItem.Icon>
                                        </telerik:RadMenuItem>
                                        <telerik:RadMenuItem Header="Einfügen" Name="cmTreePaste">
                                            <telerik:RadMenuItem.Icon>
                                                <Image Source="/ICConfPrototyp;component/Images/ico/paste.ico" Stretch="UniformToFill" />
                                            </telerik:RadMenuItem.Icon>
                                        </telerik:RadMenuItem>
                                        <telerik:RadMenuItem IsSeparator="True" />
                                        <telerik:RadMenuItem Header="Neu" Name="cmTreeNew" Click="cmTreeNew_Click" />
                                        <telerik:RadMenuItem Header="Umbenennen" Name="cmTreeRename"/>
                                        <telerik:RadMenuItem Header="Löschen" Name="cmTreeDelete"/>
                                        <telerik:RadMenuItem IsSeparator="True" />
                                        <telerik:RadMenuItem Header="Öffnen" Name="cmTreeOpen" Click="cmTreeOpen_Click" />
                                        <telerik:RadMenuItem Header="Aktualisieren" Name="cmTreeRefresh"/>
                                        <telerik:RadMenuItem IsSeparator="True" />
                                        <telerik:RadMenuItem Header="Browser" Name="cmTreeBrowser"/>
                                    </telerik:RadContextMenu>
                                </telerik:RadContextMenu.ContextMenu>
     
                            </telerik:RadTreeView>
                                </telerik:RadPane.Content>
                        </telerik:RadPane>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
     
                <telerik:RadSplitContainer telerik:DockingPanel.InitialSize="200,200"
                        x:Name="BottomContainer" InitialPosition="DockedBottom">
                    <telerik:RadPaneGroup x:Name="Group3">
                        <telerik:RadPane x:Name="pHilfe" Header="Hilfe" telerik:RadDocking.SerializationTag="HilfePane">
     
                        </telerik:RadPane>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking>
        </Grid>
     
    </Window>
  5. Andi
    Andi avatar
    39 posts
    Member since:
    Aug 2010

    Posted 18 Jan 2011 Link to this post

    Now I have tried two different ways.
    First: I load the layout after all is done in the Loaded-Event. It does not work for me because the Panes all shown as empty.
    Second: I've built in a button, where the user can reset the layout back to standard. This works correctly.

    Both ways uses the same method, just the filename (string p) is different:
    private void LoadLayout(string p)
    {
      if (File.Exists(p))
      {
        Stream loadStream = new FileStream(p, FileMode.Open);
        loadStream.Seek(0, SeekOrigin.Begin);
        this.radDocking1.LoadLayout(loadStream);
        loadStream.Close();
      }
    }

    Why will the first way not work? It's very frustrating.
    Any suggestions?
  6. George
    Admin
    George avatar
    1332 posts

    Posted 18 Jan 2011 Link to this post

    Hi Andi,

     
    I would suggest you to set serialization tags to each RadPaneGroup. I hope this helps.

    Regards,
    George
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  7. Andi
    Andi avatar
    39 posts
    Member since:
    Aug 2010

    Posted 19 Jan 2011 Link to this post

    Thank you George,

    I tried it but it will just work if I do not move any Pane.
    This is the saved layout without moving anything:
    <?xml version="1.0" encoding="utf-8"?>
    <RadDocking>
        <DocumentHost>
            <RadSplitContainer>
                <Items>
                    <RadPaneGroup SerializationTag="BrowserGroup" SelectedIndex="0">
                        <Items>
                            <RadDocumentPane SerializationTag="BrowserPane" IsDockable="True" Title="Beschreibung" Header="Browser" />
                        </Items>
                    </RadPaneGroup>
                </Items>
            </RadSplitContainer>
        </DocumentHost>
        <SplitContainers>
            <RadSplitContainer Dock="DockedLeft" Width="250">
                <Items>
                    <RadPaneGroup SerializationTag="FunktionGroup" SelectedIndex="0">
                        <Items>
                            <RadPane SerializationTag="FunktionPane" IsDockable="True" Title="Funktionen" Header="Funktionen" />
                        </Items>
                    </RadPaneGroup>
                </Items>
            </RadSplitContainer>
            <RadSplitContainer Dock="DockedRight" Width="200">
                <Items>
                    <RadPaneGroup SerializationTag="ExplorerGroup" SelectedIndex="0">
                        <Items>
                            <RadPane SerializationTag="ExplorerPane" IsDockable="True" Title="ICConf Explorer" Header="ICConf Explorer" />
                        </Items>
                    </RadPaneGroup>
                </Items>
            </RadSplitContainer>
            <RadSplitContainer Dock="DockedBottom" Height="200">
                <Items>
                    <RadPaneGroup SerializationTag="HilfeGroup" SelectedIndex="0">
                        <Items>
                            <RadPane SerializationTag="HilfePane" IsDockable="True" Title="Hilfe" Header="Hilfe" />
                        </Items>
                    </RadPaneGroup>
                </Items>
            </RadSplitContainer>
        </SplitContainers>
    </RadDocking>
    after moving any pane (eg. the right pane over to the the left and back to the right) the saved layout looks so:
    <?xml version="1.0" encoding="utf-8"?>
    <RadDocking>
        <DocumentHost>
            <RadSplitContainer>
                <Items>
                    <RadPaneGroup SerializationTag="BrowserGroup" SelectedIndex="0">
                        <Items>
                            <RadDocumentPane SerializationTag="BrowserPane" IsPinned="True" IsDockable="True" Title="Beschreibung" Header="Browser" />
                        </Items>
                    </RadPaneGroup>
                </Items>
            </RadSplitContainer>
        </DocumentHost>
        <SplitContainers>
            <RadSplitContainer Dock="DockedRight" Width="240" RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True">
                <Items>
                    <RadPaneGroup RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True" SelectedIndex="0">
                        <Items>
                            <RadPane SerializationTag="ExplorerPane" IsDockable="True" Title="ICConf Explorer" Header="ICConf Explorer" />
                        </Items>
                    </RadPaneGroup>
                </Items>
            </RadSplitContainer>
            <RadSplitContainer Dock="DockedLeft" Width="250">
                <Items>
                    <RadPaneGroup SerializationTag="FunktionGroup" SelectedIndex="0">
                        <Items>
                            <RadPane SerializationTag="FunktionPane" IsDockable="True" Title="Funktionen" Header="Funktionen" />
                        </Items>
                    </RadPaneGroup>
                </Items>
            </RadSplitContainer>
            <RadSplitContainer Dock="DockedRight" Width="200">
                <Items>
                    <RadPaneGroup SerializationTag="ExplorerGroup" SelectedIndex="-1">
                        <Items />
                    </RadPaneGroup>
                </Items>
            </RadSplitContainer>
            <RadSplitContainer Dock="DockedBottom" Height="200">
                <Items>
                    <RadPaneGroup SerializationTag="HilfeGroup" SelectedIndex="0">
                        <Items>
                            <RadPane SerializationTag="HilfePane" IsDockable="True" Title="Hilfe" Header="Hilfe" />
                        </Items>
                    </RadPaneGroup>
                </Items>
            </RadSplitContainer>
        </SplitContainers>
    </RadDocking>
    Loading this layout does not show the content from my ExplorerPane.
    Same happens when I take one Pane and make it (at runtime) floating. After saving and loading the layout the content will not be shown.
  8. Buzz
    Buzz avatar
    32 posts
    Member since:
    Oct 2010

    Posted 20 Jan 2011 Link to this post

    I had a similar problem when trying to load my layout in my window's Loaded handler.
    I then handled my window's DataContextChanged event and did the LoadLayout in there, and had success.

    Just throwing this out there in case it might help.
    Buzz
  9. Andi
    Andi avatar
    39 posts
    Member since:
    Aug 2010

    Posted 21 Jan 2011 Link to this post

    Thank you for your help Buzz. In my case the DataContextChanged - Event will not be fired. Don't know why.
    What is the DataContext and how can I force it to change?
  10. Buzz
    Buzz avatar
    32 posts
    Member since:
    Oct 2010

    Posted 21 Jan 2011 Link to this post

    If you are using data bindings, the DataContext is whatever data object you've bound your UI element (window) to.

    If that object changes, UI elements bound to that object will automatically update.  I had thought that the docking LoadLayout was having issue when the DataContext was not yet set.  But I'm beginning to think otherwise.
    I'm currently having problems with LoadLayout when my saved layout has floating panes (panes are empty after loadlayout) and I'm trying to create a simple demonstration app for these issues.  I've gotten to the point where my app does not use binding (DataContext) and I still see problems.  So I don't think that's it after all.
    I hope to figure something out with all of this today.  I'll post back if I do.

    Buzz
  11. George
    Admin
    George avatar
    1332 posts

    Posted 27 Jan 2011 Link to this post

    Hello,

     
    This problem occurs when you dock the pane to location with no existing RadPaneGroup. In this case, a new group is generated (and it has no serialization tag) and the RadPane is placed in this group. In your case, the RadPaneGroup, that contains the RadPane with SerializationTag="ExplorerPane", has no serialization tag. I could suggest you to set serialization tags on each new generated PaneGroup. You could handle PaneStateChanged event of the RadDocking, and you could get when a pane changes its state. In this case, you could get the Radpane group that contains this pane and determine whether this group has serialization tag or not.

    We will fix this problem with loading the layout in our future releases.

    Regards,
    George
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  12. Andi
    Andi avatar
    39 posts
    Member since:
    Aug 2010

    Posted 27 Jan 2011 Link to this post

    Ok, thank you for explaining that Buzz.
    I do not use any DataBindings in the main window or in any Pane. So I think I have a problem.

    Thank you George, I will give it a try
  13. Andi
    Andi avatar
    39 posts
    Member since:
    Aug 2010

    Posted 27 Jan 2011 Link to this post

    How can I check the SerialisationTag? It seems not to be a visible Member, isn't it?
  14. George
    Admin
    George avatar
    1332 posts

    Posted 31 Jan 2011 Link to this post

    Hi,

     
    I would suggest you to use RadDocking.GetSerializationTag(DependencyObject obj) method. This is a static method and it returns a string value.

    All the best,
    George
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top
UI for WPF is Visual Studio 2017 Ready