You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

125 lines
9.0 KiB
XML

<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfSketch"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon" x:Class="WpfSketch.Window1"
mc:Ignorable="d"
Title="剪贴板图像编辑" Height="622.555" Width="1046.534" Loaded="Window_Loaded" Background="#FF3C2A2A" MinWidth="550" MinHeight="440" Closing="Window_Closing" WindowStartupLocation="CenterScreen" Topmost="True" Icon="image/Design_32x32.png">
<Grid x:Name="root" MinHeight="340" MinWidth="500" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
<Grid.Background>
<SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ControlDarkColorKey}}"/>
</Grid.Background>
<Grid.RowDefinitions>
<RowDefinition MinHeight="300"/>
<RowDefinition MinHeight="40" MaxHeight="40"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition MaxWidth="40" MinWidth="40"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ScrollViewer Grid.Column="1" Grid.Row="0" Name="scrollViewer1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<InkCanvas x:Name="MainInkCanvas" Width="400" Height="340">
<Image x:Name="img" VerticalAlignment="Top" HorizontalAlignment="Left"
Height="{Binding ActualHeight, ElementName=MainInkCanvas}"
Width="{Binding ActualWidth, ElementName=MainInkCanvas}" Stretch="None"/>
</InkCanvas>
</ScrollViewer>
<ToolBarTray Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" ClipToBounds="True" HorizontalAlignment="Left" Width="37" Orientation="Vertical">
<ToolBar x:Name="tbDraw" ToolBarTray.IsLocked="True" HorizontalAlignment="Left" Width="29" Margin="3,3,0,3" Height="395" VerticalAlignment="Top">
<Button Name="btnSave" Click="BtnSave_Click">
<Image Source="/Image/Apply_16x16.png" Stretch="None" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality"/>
</Button>
<Button Name="btnExit" Click="BtnExit_Click">
<Image Source="/Image/Cancel.png" Stretch="None" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality"/>
</Button>
<Separator/>
<Button Name="btnUndo" Click="BtnUndo_Click">
<Image Source="/Image/Undo.png" Stretch="None" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality"/>
</Button>
<Button Name="btnRedo" Click="BtnRedo_Click">
<Image Source="/Image/Redo.png" Stretch="None" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality"/>
</Button>
<Separator/>
<RadioButton x:Name="btnNone" Height="24" Width="24" GroupName="g1" ToolTip="无操作" Click="BtnNone_Click">
<Image Source="/Image/default.png" Stretch="None" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality"/>
</RadioButton>
<RadioButton x:Name="btnSelect" Height="24" Width="24" GroupName="g1" ToolTip="选择" Click="BtnSelect_Click">
<Image Source="/Image/Select.png" Stretch="None" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality"/>
</RadioButton>
<RadioButton x:Name="btnPen" Height="24" Width="24" GroupName="g1" Click="BtnPen_Click" ToolTip="自由画笔">
<Image Source="/Image/PenColor.png" Stretch="None" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality"/>
</RadioButton>
<RadioButton x:Name="btnLine" Height="24" Width="24" GroupName="g1" Click="BtnLine_Click" RenderOptions.BitmapScalingMode="HighQuality">
<Image Source="/Image/Curve_Line.png" Stretch="None" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality"/>
</RadioButton>
<RadioButton x:Name="btnArrow" Height="24" Width="24" GroupName="g1" Click="BtnArrow_Click">
<Image Source="/Image/arrowdownleft.png" Stretch="Fill" Height="16" Width="16" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality"/>
</RadioButton>
<RadioButton x:Name="btnRectangle" Height="24" Width="24" GroupName="g1" Click="BtnRectangle_Click">
<Image Source="/Image/Rectangle.png" Stretch="None" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality"/>
</RadioButton>
<RadioButton x:Name="btnCircle" GroupName="g1" Click="BtnCircle_Click">
<Image Source="/Image/Circle.png" Stretch="None" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality"/>
</RadioButton>
<RadioButton x:Name="btnText" GroupName="g1" Click="BtnText_Click">
<Image Source="/Image/TextTool.png" Stretch="None" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality"/>
</RadioButton>
<Button Name="btnFontIncrease" ToolTip="放大字体" Click="BtnFontIncrease_Click">
<Image Source="/Image/FontSizeIncrease.png" Stretch="None" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality"/>
</Button>
<Button Name="btnFontDecrease" ToolTip="缩小字体" Click="BtnFontDecrease_Click">
<Image Source="/Image/FontSizeDecrease.png" Stretch="None" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality"/>
</Button>
<!--<Separator/>-->
</ToolBar>
</ToolBarTray>
<ToolBarTray Grid.Column="1" Grid.Row="1" Name="trayBottom" Margin="1,0,2,0" VerticalAlignment="Bottom" Height="34">
<ToolBar Height="34" Width="{Binding ActualWidth, ElementName=trayBottom}" VerticalAlignment="Top" Margin="0,0,-652,-21" HorizontalAlignment="Left">
<RadioButton Name="btnColorRed" ToolTip="Red" Click="ColorButton_Click" GroupName="Color">
<Rectangle Width="14" Height="14" Fill="Red"/>
</RadioButton>
<RadioButton ToolTip="Orange" Click="ColorButton_Click" GroupName="Color">
<Rectangle Width="14" Height="14" Fill="Orange"/>
</RadioButton>
<RadioButton ToolTip="Yellow" Click="ColorButton_Click" GroupName="Color">
<Rectangle Width="14" Height="14" Fill="Yellow"/>
</RadioButton>
<RadioButton ToolTip="Green" Click="ColorButton_Click" GroupName="Color">
<Rectangle Width="14" Height="14" Fill="Green"/>
</RadioButton>
<RadioButton ToolTip="Blue" Click="ColorButton_Click" GroupName="Color">
<Rectangle Width="14" Height="14" Fill="Blue"/>
</RadioButton>
<RadioButton ToolTip="Purple" Click="ColorButton_Click" GroupName="Color">
<Rectangle Width="14" Height="14" Fill="Purple"/>
</RadioButton>
<RadioButton ToolTip="Transparent" Click="ColorButton_Click" BorderThickness="1" GroupName="Color">
<Rectangle Width="14" Height="14" Fill="White" />
</RadioButton>
<RadioButton ToolTip="Black" Click="ColorButton_Click" GroupName="Color">
<Rectangle Width="14" Height="14" Fill="Black"/>
</RadioButton>
<Separator/>
<RadioButton Name="rbtnPenWidthMin" Width="24" Height="24" ToolTip="Black" Checked="PenWidth_Checked">
<Ellipse Width="4" Height="4" Fill="Red"/>
</RadioButton>
<RadioButton Width="24" Height="24" ToolTip="Black" Checked="PenWidth_Checked">
<Ellipse Width="6" Height="6" Fill="Red"/>
</RadioButton>
<RadioButton Width="24" Height="24" ToolTip="Black" Checked="PenWidth_Checked">
<Ellipse Width="8" Height="8" Fill="Red"/>
</RadioButton>
<RadioButton Width="24" Height="24" ToolTip="Black" BorderThickness="0" Padding="0" Checked="PenWidth_Checked">
<Ellipse Width="10" Height="10" Fill="Red"/>
</RadioButton>
<RadioButton Width="24" Height="24" ToolTip="Black" Padding="0" BorderThickness="0" Checked="PenWidth_Checked">
<Ellipse Width="14" Height="14" Fill="Red" Margin="0,0,0,0"/>
</RadioButton>
</ToolBar>
</ToolBarTray>
</Grid>
</Window>