Files
SteamTools/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Controls/ToastMessage.axaml
T
2021-03-08 17:45:29 +08:00

29 lines
1.9 KiB
XML

<UserControl xmlns="https://github.com/avaloniaui"
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:vm="clr-namespace:System.Application.UI.ViewModels;assembly=System.Application.SteamTools.Client.Desktop"
xmlns:service="clr-namespace:System.Application.Services;assembly=System.Application.SteamTools.Client.Desktop"
mc:Ignorable="d" d:DesignWidth="300" d:DesignHeight="50" Margin="0 0 0 20"
Background="Transparent" IsVisible="{Binding Source={x:Static service:ToastService.Current},Path=IsVisible,Mode=OneWay}"
x:Class="System.Application.UI.Controls.ToastMessage">
<Design.DataContext>
<vm:ToastMessageViewModel/>
</Design.DataContext>
<Border Background="{DynamicResource ActiveBackgroundBrushKey}" Classes="paper" CornerRadius="3">
<StackPanel Orientation="Horizontal">
<!--<TextBlock Text="{Binding Title}" FontSize="16"/>-->
<Border Padding="10">
<TextBlock Text="{Binding Source={x:Static service:ToastService.Current},Path=Message,Mode=OneWay}" FontSize="14" Foreground="{DynamicResource HighlightForegroundColorKey}" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="WrapWithOverflow" MaxWidth="780"/>
</Border>
<Button Width="40" Height="40" Background="Transparent" Command="{Binding Source={x:Static service:ToastService.Current},Path=CloseBtn_Click}">
<Image Width="12">
<Image.Source>
<DrawingImage Drawing="{DynamicResource CloseDrawing}"></DrawingImage>
</Image.Source>
</Image>
</Button>
</StackPanel>
</Border>
</UserControl>