101 lines
4.2 KiB
Plaintext
101 lines
4.2 KiB
Plaintext
|
|
<UserControl x:Class="YY.Admin.Views.Dialogs.AlertDialogView"
|
||
|
|
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:prism="http://prismlibrary.com/"
|
||
|
|
xmlns:ctls="clr-namespace:YY.Admin.Core.Controls;assembly=YY.Admin.Core"
|
||
|
|
Width="400" Height="260">
|
||
|
|
|
||
|
|
<UserControl.Resources>
|
||
|
|
<Style x:Key="DialogButton" TargetType="Button">
|
||
|
|
<Setter Property="Background" Value="#1890ff"/>
|
||
|
|
<Setter Property="Foreground" Value="White"/>
|
||
|
|
<Setter Property="BorderThickness" Value="0"/>
|
||
|
|
<Setter Property="Height" Value="32"/>
|
||
|
|
<Setter Property="Width" Value="80"/>
|
||
|
|
<Setter Property="FontSize" Value="14"/>
|
||
|
|
<Setter Property="Cursor" Value="Hand"/>
|
||
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
||
|
|
</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="#1890ff"
|
||
|
|
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=""
|
||
|
|
Foreground="White"
|
||
|
|
FontSize="16"
|
||
|
|
Margin="0,0,8,0"/>
|
||
|
|
<TextBlock Text="{Binding Title}"
|
||
|
|
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">
|
||
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||
|
|
<TextBlock Text="{Binding Message}"
|
||
|
|
TextWrapping="Wrap"
|
||
|
|
TextAlignment="Center"
|
||
|
|
VerticalAlignment="Center"
|
||
|
|
HorizontalAlignment="Center"
|
||
|
|
FontSize="14"
|
||
|
|
Foreground="#666666"
|
||
|
|
LineHeight="20"/>
|
||
|
|
</ScrollViewer>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<!-- 按钮区域 -->
|
||
|
|
<Border Grid.Row="2"
|
||
|
|
Background="#fafafa"
|
||
|
|
CornerRadius="0,0,8,8"
|
||
|
|
Height="60">
|
||
|
|
<Button Content="确定"
|
||
|
|
Command="{Binding CloseCommand}"
|
||
|
|
Style="{StaticResource DialogButton}"
|
||
|
|
HorizontalAlignment="Center"
|
||
|
|
VerticalAlignment="Center"/>
|
||
|
|
</Border>
|
||
|
|
</Grid>
|
||
|
|
</Border>
|
||
|
|
</UserControl>
|