xaml-sdk/Docking/SplitContainerDockState/Example.xaml

52 строки
3.0 KiB
XML

<UserControl x:Class="SplitContainerDockState.Example"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="800">
<UserControl.Resources>
<telerik:InvertedBooleanConverter x:Key="InvertedBooleanConverter"/>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="This example demonstrates how to get the DockState of a SplitContainer. The DockState is an enumeration that represents the state of a SplitContainer compared to the root of the RadDocking."
TextWrapping="Wrap" Width="400" FontWeight="Bold" Margin="20"
Grid.Row="0" Grid.Column="0" Grid.RowSpan="2"/>
<telerik:RadButton Content="Show 'Pane 1' DockState" Click="ShowPane1DockStateClick" Margin="10" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="0" Grid.Column="1" IsEnabled="{Binding ElementName=pane1, Path=IsFloating, Converter={StaticResource InvertedBooleanConverter}}"/>
<telerik:RadButton Content="Show 'Pane 2' DockState" Click="ShowPane2DockStateClick" Margin="10 0 10 10" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Grid.Column="1" IsEnabled="{Binding ElementName=pane2, Path=IsFloating, Converter={StaticResource InvertedBooleanConverter}}"/>
</Grid>
<telerik:RadDocking Grid.Row="1">
<telerik:RadSplitContainer>
<telerik:RadPaneGroup>
<telerik:RadPane Header="Pane 1" x:Name="pane1" CanUserPin="False">
<TextBlock Text="Pane 1 Content" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</telerik:RadPane>
</telerik:RadPaneGroup>
</telerik:RadSplitContainer>
<telerik:RadSplitContainer InitialPosition="DockedRight">
<telerik:RadPaneGroup>
<telerik:RadPane Header="Pane 2" x:Name="pane2" CanUserPin="False">
<TextBlock Text="Pane 2 Content" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</telerik:RadPane>
</telerik:RadPaneGroup>
</telerik:RadSplitContainer>
</telerik:RadDocking>
</Grid>
</UserControl>