feat: 13-几何图形和图画-2使用GeometryGroup组合形状
This commit is contained in:
parent
aded10ee6d
commit
52c0bfddaa
|
@ -9,4 +9,11 @@
|
|||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="public\003540AH4M72.jpg">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="public\bunny.png"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -3,10 +3,40 @@
|
|||
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:_13_几何图形和图画_2使用GeometryGroup组合形状"
|
||||
mc:Ignorable="d"
|
||||
Title="13-几何图形和图画-2使用GeometryGroup组合形状" Height="450" Width="800">
|
||||
<Grid>
|
||||
Icon="public/bunny.png" Title="13-几何图形和图画-2使用GeometryGroup组合形状" Height="800" Width="800">
|
||||
<Window.Resources>
|
||||
<GeometryGroup x:Key="GeometryGroupResources">
|
||||
<RectangleGeometry Rect="0,0 100,100" />
|
||||
<EllipseGeometry Center="150,50" RadiusX="35" RadiusY="25" />
|
||||
</GeometryGroup>
|
||||
</Window.Resources>
|
||||
<Canvas>
|
||||
<Path Fill="Yellow" Stroke="Blue" Margin="5" Canvas.Top="10" Canvas.Left="10">
|
||||
<Path.Data>
|
||||
<GeometryGroup>
|
||||
<RectangleGeometry Rect="0,0 100,100" />
|
||||
<EllipseGeometry Center="100,50" RadiusX="35" RadiusY="25" />
|
||||
</GeometryGroup>
|
||||
</Path.Data>
|
||||
</Path>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
<Path Fill="YellowGreen" Stroke="Blue" Canvas.Top="150" Canvas.Left="10"
|
||||
Data="{StaticResource GeometryGroupResources}" />
|
||||
<Path Fill="Aquamarine" Stroke="Blue" Canvas.Top="300" Canvas.Left="10"
|
||||
Data="{StaticResource GeometryGroupResources}" />
|
||||
|
||||
|
||||
<TextBlock Canvas.Top="500" Canvas.Left="10" TextWrapping="Wrap">
|
||||
F:/学习代码/C#/WPF/4-图形和动画/13-几何图形和图画-1路径和集合图形/bin/Debug/net8.0-windows/13-几何图形和图画-1路径和集合图形.exe
|
||||
</TextBlock>
|
||||
<Path Fill="Violet" Stroke="Blue" Margin="5" Canvas.Top="450" Canvas.Left="10">
|
||||
<Path.Data>
|
||||
<GeometryGroup>
|
||||
<RectangleGeometry Rect="0,0 100,100" />
|
||||
<EllipseGeometry Center="50,50" RadiusX="35" RadiusY="25" />
|
||||
</GeometryGroup>
|
||||
</Path.Data>
|
||||
</Path>
|
||||
</Canvas>
|
||||
</Window>
|
Binary file not shown.
After Width: | Height: | Size: 97 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.2 MiB |
Loading…
Reference in New Issue