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.
52 lines
3.1 KiB
XML
52 lines
3.1 KiB
XML
<Window x:Class="CommonFunc.HMessageBox"
|
|
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:CommonFunc"
|
|
mc:Ignorable="d"
|
|
Title="HMessageBox" Height="210" Width="420" WindowStartupLocation="CenterScreen" WindowStyle="None" BorderThickness="1,1,1,1" ResizeMode="NoResize" Closed="Window_Closed" Loaded="Window_Loaded">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="50"/>
|
|
</Grid.RowDefinitions>
|
|
<!--显示图片和文本-->
|
|
<StackPanel Grid.Row="0" VerticalAlignment="Center" Orientation="Horizontal">
|
|
<Image x:Name="MsgImg" Width="62" Height="62" Margin="40,20,20,20" >
|
|
<Image.Triggers>
|
|
<EventTrigger RoutedEvent="Loaded">
|
|
<EventTrigger.Actions>
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<DoubleAnimation From="1" To="0" Duration="0:0:1.5" Storyboard.TargetProperty="Opacity"/>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<DoubleAnimation From="0" To="1" Duration="0:0:1.5" Storyboard.TargetProperty="Opacity"/>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</EventTrigger.Actions>
|
|
</EventTrigger>
|
|
</Image.Triggers>
|
|
</Image>
|
|
<TextBlock VerticalAlignment="Center" x:Name="TxtMsg" HorizontalAlignment="Left" Foreground="Black" TextWrapping="WrapWithOverflow" Width="280" TextAlignment="Left"
|
|
FontSize="18"/>
|
|
</StackPanel>
|
|
<Border BorderBrush="#FF34268A" BorderThickness="0,0.8,0,0"></Border>
|
|
<!--Button Margin(坐上右下)-->
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" >
|
|
|
|
<Button Content="确 定" Background="#216DD3" BorderBrush="Transparent" x:Name="OkButton" Width="80" Height="28" Click="OkButton_Click" Margin="10,0,15,0" IsDefault="True"
|
|
/>
|
|
<Button Content="是" Background="#216DD3" BorderBrush="Transparent" x:Name="YesButton" Width="80" Height="28" Click="YesButton_Click" Margin="10,0,15,0"
|
|
/>
|
|
<Button Content="否" Background="#D7D7D7" Foreground="Black" BorderBrush="Transparent" BorderThickness="0.5" x:Name="NoButton" Width="80" Height="28" Click="NoButton_Click" Margin="10,0,15,0"
|
|
/>
|
|
<Button Content="取消" Background="#D7D7D7" Foreground="Black" BorderBrush="Transparent" BorderThickness="0.5" x:Name="CancelButton" Width="80" Height="28" Click="CancelButton_Click" Margin="10,0,15,0"
|
|
/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Window>
|