- 项目类型:WPF
- 项目语言:c#
- 项目框架:.Net5
1.主界面Xaml
<Window x:Class="WpfApp4.MainWindow"
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:WpfApp4"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<DockPanel LastChildFill="True">
<Grid DockPanel.Dock="Left" Width="200">
<StackPanel>
<Button Content="选择图片" Click="Button_Click_1" Height="30" Margin="5" />
<Button Content="绘制路径" Height="30" Margin="5" Click="Button_Click_2" />
<Button Content="清空路径" Height="30" Margin="5" Click="Button_Click_5" />
<Button Content="保存路径" Height="30" Margin="5" Click="Button_Click_3" />
<Button Content="加载路径" Height="30" Margin="5" Click="Button_Click_4" />
<Button Content="栽剪" Click="Button_Click" Height="30" Margin="5"/>
</StackPanel>
</Grid>
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="文件路径"/>