2025-08-24 13:49:55 +08:00
|
|
|
<UserControl
|
2026-01-02 17:30:30 +08:00
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
MinHeight="50"
|
|
|
|
|
Width="320"
|
|
|
|
|
mc:Ignorable="d"
|
2026-01-02 17:30:41 +08:00
|
|
|
x:Class="Melskin.Controls.ToastControl"
|
2025-08-24 13:49:55 +08:00
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
2026-01-02 17:30:41 +08:00
|
|
|
xmlns:controls="clr-namespace:Melskin.Controls"
|
2025-09-08 19:49:09 +08:00
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
2025-08-24 13:49:55 +08:00
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2026-01-02 17:30:30 +08:00
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
2025-08-24 13:49:55 +08:00
|
|
|
<Border
|
|
|
|
|
Background="{DynamicResource BackgroundFloatingBrush}"
|
|
|
|
|
BorderBrush="{DynamicResource BorderNormalBrush}"
|
|
|
|
|
BorderThickness="1"
|
2026-01-02 17:30:30 +08:00
|
|
|
CornerRadius="4"
|
|
|
|
|
x:Name="RootBorder">
|
2025-08-24 13:49:55 +08:00
|
|
|
<Border.Effect>
|
|
|
|
|
<DropShadowEffect
|
|
|
|
|
BlurRadius="8"
|
|
|
|
|
Direction="270"
|
|
|
|
|
Opacity="0.15"
|
|
|
|
|
ShadowDepth="1" />
|
|
|
|
|
</Border.Effect>
|
|
|
|
|
<StackPanel Margin="15,12" Orientation="Horizontal">
|
2025-09-08 19:49:09 +08:00
|
|
|
<controls:IconElement
|
2025-12-23 21:35:54 +08:00
|
|
|
Height="20"
|
2026-01-02 17:30:30 +08:00
|
|
|
Margin="0,0,14,0"
|
|
|
|
|
Width="20"
|
|
|
|
|
x:Name="Icon">
|
2025-09-08 19:49:09 +08:00
|
|
|
<controls:IconElement.Style>
|
|
|
|
|
<Style BasedOn="{StaticResource IconElementStyle}" TargetType="controls:IconElement">
|
2025-08-24 13:49:55 +08:00
|
|
|
<Style.Triggers>
|
2025-09-08 19:49:09 +08:00
|
|
|
|
2025-08-24 13:49:55 +08:00
|
|
|
<DataTrigger Binding="{Binding Type}" Value="Success">
|
2025-09-08 19:49:09 +08:00
|
|
|
<Setter Property="Symbol" Value="CheckCircle" />
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SuccessBrush}" />
|
2025-08-24 13:49:55 +08:00
|
|
|
</DataTrigger>
|
2025-09-08 19:49:09 +08:00
|
|
|
|
|
|
|
|
|
2025-08-24 13:49:55 +08:00
|
|
|
<DataTrigger Binding="{Binding Type}" Value="Info">
|
2025-09-08 19:49:09 +08:00
|
|
|
<Setter Property="Symbol" Value="Info" />
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource InfoBrush}" />
|
2025-08-24 13:49:55 +08:00
|
|
|
</DataTrigger>
|
2025-09-08 19:49:09 +08:00
|
|
|
|
|
|
|
|
|
2025-08-24 13:49:55 +08:00
|
|
|
<DataTrigger Binding="{Binding Type}" Value="Warning">
|
2025-09-08 19:49:09 +08:00
|
|
|
<Setter Property="Symbol" Value="Warning" />
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource WarningBrush}" />
|
2025-08-24 13:49:55 +08:00
|
|
|
</DataTrigger>
|
2025-09-08 19:49:09 +08:00
|
|
|
|
|
|
|
|
|
2025-08-24 13:49:55 +08:00
|
|
|
<DataTrigger Binding="{Binding Type}" Value="Error">
|
2025-09-08 19:49:09 +08:00
|
|
|
<Setter Property="Symbol" Value="Error" />
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource ErrorBrush}" />
|
2025-08-24 13:49:55 +08:00
|
|
|
</DataTrigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
2025-09-08 19:49:09 +08:00
|
|
|
</controls:IconElement.Style>
|
|
|
|
|
</controls:IconElement>
|
2025-08-24 13:49:55 +08:00
|
|
|
<TextBlock
|
|
|
|
|
Foreground="{DynamicResource TextPrimaryBrush}"
|
|
|
|
|
Text="This is a toast message."
|
2026-01-02 17:30:30 +08:00
|
|
|
TextWrapping="Wrap"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
x:Name="MessageTextBlock" />
|
2025-08-24 13:49:55 +08:00
|
|
|
</StackPanel>
|
|
|
|
|
</Border>
|
2025-09-08 19:49:09 +08:00
|
|
|
</UserControl>
|