5-WPFTemplates-And-CustomEl.../5-17.2理解模板/MainWindow.xaml

37 lines
2.2 KiB
XML

<Window x:Class="_5_17._2理解模板.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"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<ControlTemplate TargetType="{x:Type ResizeGrip}">
<Grid Background="{TemplateBinding Panel.Background}" SnapsToDevicePixels="True">
<Path Margin="0,0,2,2" Data="M9,0L11,0 11,11 0,11 0,9 3,9 3,6 6,6 6,3 9,3z" HorizontalAlignment="Right"
VerticalAlignment="Bottom">
<Path.Fill>
<DrawingBrush ViewboxUnits="Absolute" TileMode="Tile" Viewbox="0,0,3,3" Viewport="0,0,3,3"
ViewportUnits="Absolute">
<DrawingBrush.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing Geometry="M0,0L2,0 2,2 0,2z">
<GeometryDrawing.Brush>
<LinearGradientBrush EndPoint="1,0.75" StartPoint="0,0.25">
<LinearGradientBrush.GradientStops>
<GradientStop Offset="0.3" Color="#fff" />
<GradientStop Offset="0.75" Color="#ffbbc5d7" />
<GradientStop Offset="1" Color="#ff6d83a9" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</GeometryDrawing.Brush>
</GeometryDrawing>
</DrawingGroup.Children>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</Path.Fill>
</Path>
</Grid>
</ControlTemplate>
</Window>