Files
qhmes/yy-admin-master/YY.Admin/Views/Dialogs/WarningDialogView.xaml

110 lines
4.5 KiB
XML

<UserControl x:Class="YY.Admin.Views.Dialogs.WarningDialogView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:ctls="clr-namespace:YY.Admin.Core.Controls;assembly=YY.Admin.Core"
Width="420" Height="280">
<UserControl.Resources>
<Style x:Key="WarningButton" TargetType="Button">
<Setter Property="Background" Value="#faad14"/>
</Style>
</UserControl.Resources>
<Border Background="White"
CornerRadius="8"
BorderBrush="#f0f0f0"
BorderThickness="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 标题栏 -->
<Border Grid.Row="0"
Background="#faad14"
CornerRadius="8,8,0,0"
Height="50">
<Grid Margin="16,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
<ctls:FontAwesomeIcon
Icon="&#xf071;"
Foreground="White"
FontSize="16"
Margin="0,0,8,0"/>
<TextBlock Text="警告提示"
Foreground="White"
FontWeight="Bold"
FontSize="14"
VerticalAlignment="Center"/>
</StackPanel>
<Button Grid.Column="2"
Command="{Binding CloseCommand}"
Style="{StaticResource ButtonIcon}"
Foreground="White"
Background="Transparent"
BorderThickness="0"
Width="24" Height="24"
hc:IconElement.Geometry="{StaticResource ErrorGeometry}"
Padding="0"
VerticalAlignment="Center"/>
</Grid>
</Border>
<!-- 内容区域 -->
<Border Grid.Row="1" Padding="20">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- 警告图标 -->
<Border Grid.Column="0"
Background="#fffbe6"
Width="48" Height="48"
CornerRadius="24"
Margin="0,0,16,0">
<ctls:FontAwesomeIcon
Icon="&#xf071;"
Foreground="#faad14"
FontSize="20"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<!-- 警告消息 -->
<ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Auto">
<TextBlock Text="{Binding Message}"
TextWrapping="Wrap"
VerticalAlignment="Center"
FontSize="14"
Foreground="#666666"
LineHeight="20"/>
</ScrollViewer>
</Grid>
</Border>
<!-- 按钮区域 -->
<Border Grid.Row="2"
Background="#fafafa"
CornerRadius="0,0,8,8"
Height="60">
<Button Content="确定"
Command="{Binding CloseCommand}"
Style="{StaticResource WarningButton}"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
</Grid>
</Border>
</UserControl>