Mini Kabibi Habibi

Current Path : C:/Users/Public/Documents/DXperience 13.1 Demos/WPF/CS/DockingDemo.Wpf/Modules/
Upload File :
Current File : C:/Users/Public/Documents/DXperience 13.1 Demos/WPF/CS/DockingDemo.Wpf/Modules/Serialization.xaml

<local:DockingDemoModule x:Class="DockingDemo.Serialization"
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 xmlns:local="clr-namespace:DockingDemo"
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
    xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
    xmlns:dxdb="http://schemas.devexpress.com/winfx/2008/xaml/demobase"
    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
    xmlns:coll="clr-namespace:System.Collections;assembly=mscorlib"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
 xmlns:collections="clr-namespace:System.Collections;assembly=mscorlib"
    xmlns:collection="clr-namespace:System.Collections;assembly=mscorlib" Height="332" Width="721">

    <local:DockingDemoModule.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/DockingDemo;component/Themes/Generic.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <Style x:Key="PanelText" TargetType="{x:Type TextBlock}">
                <Setter Property="HorizontalAlignment" Value="Center" />
                <Setter Property="VerticalAlignment" Value="Center" />
                <Setter Property="FontSize" Value="72" />
                <Setter Property="Opacity" Value=".15" />
            </Style>
            <Thickness x:Key="ElementMargin">0,4,0,0</Thickness>
            <Thickness x:Key="GroupMargin">0,10,0,0</Thickness>
        </ResourceDictionary>
    </local:DockingDemoModule.Resources>
    <dxdb:DemoModuleControl>
        <dxdb:DemoModuleControl.OptionsContent>
            <StackPanel>
                <dx:GroupFrame Header="Layout">
                    <StackPanel>
                        <Button x:Name="serializeButton" Content="Save" Click="serializeButton_Click" />
                        <Button x:Name="deserializeButton" IsEnabled="False" Margin="{StaticResource ElementMargin}" Content="Restore" Click="deserializeButton_Click" />
                    </StackPanel>
                </dx:GroupFrame>
                <dx:GroupFrame Header="Layout Samples" Margin="{StaticResource GroupMargin}" MinWidth="150">
                    <StackPanel>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="Select:" VerticalAlignment="Center" Margin="0,0,8,0" />
                            <dxe:ComboBoxEdit Grid.Column="1" x:Name="layoutSampleName" IsTextEditable="False" SelectedIndex="0">
                                <sys:String>Layout1</sys:String>
                                <sys:String>Layout2</sys:String>
                                <sys:String>Layout3</sys:String>
                                <sys:String>Layout4</sys:String>
                            </dxe:ComboBoxEdit>
                        </Grid>
                        <Button x:Name="loadSampleLayoutButton" Margin="{StaticResource GroupMargin}" Content="Load" Click="loadSampleLayoutButton_Click" />
                    </StackPanel>
                </dx:GroupFrame>
            </StackPanel>
        </dxdb:DemoModuleControl.OptionsContent>
        <dxb:BarManager>
            <dxdo:DockLayoutManager x:Name="dockManager">
                <dxdo:LayoutGroup>
                    <dxdo:LayoutGroup Orientation="Vertical" ItemWidth="*" Name="leftGroup">
                        <dxdo:LayoutPanel Caption="Panel1" Name="panel1">
                            <TextBlock Text="1" Style="{StaticResource PanelText}" />
                        </dxdo:LayoutPanel>
                        <dxdo:LayoutPanel Caption="Panel2" Name="panel2">
                            <TextBlock Text="2" Style="{StaticResource PanelText}" />
                        </dxdo:LayoutPanel>
                    </dxdo:LayoutGroup>
                    <dxdo:LayoutPanel ShowCaption="False" Caption="Panel5" ItemWidth="2*" Name="panel0" ShowBorder="False">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <FlowDocumentScrollViewer Grid.Row="0" VerticalScrollBarVisibility="Hidden" Opacity="0.5" MaxWidth="500" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,50">
                                <FlowDocument FontFamily="Segoue" TextAlignment="Center">
                                    <Paragraph FontSize="21" Margin="0">
                                        Save/Restore layout
                                    </Paragraph>
                                    <Paragraph FontSize="14" Margin="0">
                                        The layout of DockLayoutManager can be saved to a data store (an XML file or stream) and then later, can be restored. For instance, you can save the layout, modify it and then revert to the original layout using the Restore command. Practice using the buttons on the right to see this functionality in action.
                                    </Paragraph>
                                </FlowDocument>
                            </FlowDocumentScrollViewer>
                        </Grid>
                    </dxdo:LayoutPanel>
                    <dxdo:LayoutGroup Orientation="Vertical" ItemWidth="*" Name="rightGroup">
                        <dxdo:LayoutPanel Caption="Panel3" Name="panel3">
                            <TextBlock Text="3" Style="{StaticResource PanelText}" />
                        </dxdo:LayoutPanel>
                        <dxdo:LayoutPanel Caption="Panel4" Name="panel4">
                            <TextBlock Text="4" Style="{StaticResource PanelText}" />
                        </dxdo:LayoutPanel>
                    </dxdo:LayoutGroup>
                </dxdo:LayoutGroup>
            </dxdo:DockLayoutManager>
        </dxb:BarManager>
    </dxdb:DemoModuleControl>
</local:DockingDemoModule>