直接上代码:
xmal:
<Controls:MetroWindow x:Class="MyControlLibrarys.LoadDialog"
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:MyControlLibrarys"
Title="正在加载" WindowStyle="None" Height="180" Width="430" ShowMaxRestoreButton="False" ShowMinButton="False" ShowCloseButton="False"
WindowStartupLocation="CenterScreen" Opacity="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="4*"/>
</Grid.ColumnDefinitions>
<Label Height="36" Grid.Column="1" HorizontalAlignment="Left" Margin="20 0" Name="message" VerticalAlignment="Center" FontSize="20" />
<Grid Width="35" Height="35">
<Grid.Resources>
<DrawingBrush x:Key="brush" Stretch="None" AlignmentX="Center" AlignmentY="Top">
<DrawingBrush.Drawing>
<GeometryDrawing Brush="Black">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="2" RadiusY="5"/>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingBrush.Drawing>
</DrawingBrush>
</Grid.Resources>
<Rectangle x:Name="r01" Fill="{StaticRes