<Border xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:hc="https://handyorg.github.io/handycontrol"
        x:Class="HandyControlDemo.UserControl.MainContent">
    <hc:SimplePanel>
        <Border Name="BorderRootEffect" Background="{DynamicResource RegionBrush}" CornerRadius="10" Effect="{StaticResource EffectShadow4}" Margin="16" Visibility="Collapsed"/>
        <Border Name="BorderRoot" Style="{StaticResource BorderClip}" Margin="16">
            <Grid Name="GridMain" MinHeight="300" MinWidth="200" HorizontalAlignment="Center" VerticalAlignment="Center">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Border Name="BorderEffect" Grid.RowSpan="2" Background="{DynamicResource RegionBrush}" CornerRadius="10" Effect="{StaticResource EffectShadow4}"/>
                <Border Height="32" Name="BorderTitle" Grid.Row="0" CornerRadius="10,10,0,0" Background="{DynamicResource TitleBrush}" Style="{StaticResource BorderClip}">
                    <hc:SimplePanel>
                        <hc:Watermark Mark="{Binding ContentTitle}" MarkMargin="3,0" FontSize="20" FontWeight="Bold" MarkBrush="#0F000000"/>
                        <TextBlock Style="{StaticResource TextBlockDefault}" Foreground="White" Text="{Binding ContentTitle}"/>
                        <ToggleButton Margin="0,0,6,0" IsChecked="{Binding IsOpen,ElementName=DrawerCode}" Padding="5" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ToggleButtonIconTransparent}" HorizontalAlignment="Right" hc:IconElement.Geometry="{StaticResource CodeGeometry}"/>
                        <Button Command="{Binding OpenDocCmd}" Height="26" Width="30" Margin="6,0,0,0" Padding="5" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" HorizontalAlignment="Left" hc:IconElement.Geometry="{StaticResource DocumentGeometry}"/>
                        <hc:Drawer Name="DrawerCode" Opened="DrawerCode_OnOpened">
                            <Border Style="{StaticResource BorderClip}" Margin="32,32,0,32" CornerRadius="10,0,0,10" Background="{DynamicResource RegionBrush}" Width="800" Name="BorderCode"/>
                        </hc:Drawer>
                    </hc:SimplePanel>
                </Border>
                <Border Grid.Row="1" ClipToBounds="True">
                    <ContentPresenter Name="PresenterMain" Margin="0,0,0,10" Content="{Binding SubContent}"/>
                </Border>
            </Grid>
        </Border>
    </hc:SimplePanel>
</Border>
