47 lines
2.3 KiB
XML
47 lines
2.3 KiB
XML
<UserControl x:Class="PSCHelpdesk.Toasts.Display.ToastHolder"
|
|
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="using:PSCHelpdesk.Toasts.Display"
|
|
x:DataType="vm:ToastHolderViewModel"
|
|
mc:Ignorable="d" d:DesignWidth="200" d:DesignHeight="300">
|
|
<Grid Margin="5">
|
|
<ItemsControl ItemsSource="{Binding ToastManager.Notifications}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel/>
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<UserControl Content="{Binding Path=.}"
|
|
Padding="0,2,0,0"
|
|
RenderTransformOrigin="50%, 50%">
|
|
|
|
<UserControl.RenderTransform>
|
|
<ScaleTransform />
|
|
</UserControl.RenderTransform>
|
|
<UserControl.Styles>
|
|
<Style Selector="UserControl">
|
|
<Style.Animations>
|
|
<Animation Duration="0:0:0.3">
|
|
<KeyFrame Cue="0">
|
|
<Setter Property="ScaleTransform.ScaleX" Value="0" />
|
|
<Setter Property="ScaleTransform.ScaleY" Value="0" />
|
|
</KeyFrame>
|
|
<KeyFrame Cue="100%">
|
|
<Setter Property="ScaleTransform.ScaleX" Value="1" />
|
|
<Setter Property="ScaleTransform.ScaleY" Value="1" />
|
|
</KeyFrame>
|
|
</Animation>
|
|
</Style.Animations>
|
|
</Style>
|
|
</UserControl.Styles>
|
|
</UserControl>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Grid>
|
|
</UserControl> |