<UserControl x:Class="RichCreator.Editor.Tools.CV.SplitArea"
|
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:local="clr-namespace:RichCreator.Editor"
|
mc:Ignorable="d"
|
d:DesignHeight="450" d:DesignWidth="800">
|
<Border x:Name="Border" HorizontalAlignment="Center" VerticalAlignment="Center" BorderBrush="#FF626161" BorderThickness="2" CornerRadius="3">
|
<DockPanel x:Name="sizableContent" Background="#11cccccc" Focusable="False" LastChildFill="True" MinHeight="10" MinWidth="10">
|
<Thumb DockPanel.Dock="Top" DragStarted="Thumb_DragStarted" DragCompleted="Thumb_DragCompleted" DragDelta="Thumb_DragDelta">
|
<Thumb.Style>
|
<Style TargetType="Thumb" >
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate>
|
<Border Background="Gray" Opacity="0.8" Height="30">
|
<DockPanel>
|
<Button DockPanel.Dock="Right" Width="16" Height="16" VerticalAlignment="Center" HorizontalAlignment="Center" VerticalContentAlignment="Top" HorizontalContentAlignment="Center" Margin="0,0,4,0" Click="Button_Click">
|
<Button.Content>
|
<Grid>
|
<Line X1="1" Y1="1" X2="8" Y2="8" Stroke="White" StrokeThickness="1"/>
|
<Line X1="1" Y1="8" X2="8" Y2="1" Stroke="White" StrokeThickness="1"/>
|
</Grid>
|
</Button.Content>
|
</Button>
|
<TextBlock Text="可拖区域" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
</DockPanel>
|
</Border>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
</Thumb.Style>
|
</Thumb>
|
|
<Grid DockPanel.Dock="Bottom">
|
<Thumb HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,1,1"
|
DragDelta="OnResizeThumbDragDelta"
|
DragStarted="OnResizeThumbDragStarted"
|
DragCompleted="OnResizeThumbDragCompleted">
|
<Thumb.Style>
|
<Style TargetType="{x:Type Thumb}" BasedOn="{x:Null}">
|
<Style.Setters>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate>
|
<Grid x:Name="resizeVisual" DockPanel.Dock="Right" VerticalAlignment="Bottom" >
|
<Line X1="6" Y1="18" X2="18" Y2="6" Stroke="DarkGray" StrokeThickness="1.5"/>
|
<!--smallest/right|bottom most -->
|
<Line X1="10" Y1="18" X2="18" Y2="10" Stroke="DarkGray" StrokeThickness="1.5"/>
|
<Line X1="14" Y1="18" X2="18" Y2="14" Stroke="DarkGray" StrokeThickness="1.5"/>
|
<!--longers/left|top most-->
|
<Grid.Style>
|
<Style TargetType="{x:Type Grid}">
|
<Style.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Cursor" Value="SizeNWSE"/>
|
</Trigger>
|
</Style.Triggers>
|
</Style>
|
</Grid.Style>
|
</Grid>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style.Setters>
|
</Style>
|
</Thumb.Style>
|
</Thumb>
|
</Grid>
|
|
</DockPanel>
|
</Border>
|
</UserControl>
|