|
@@ -0,0 +1,100 @@
|
|
|
+<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
+ x:ClassModifier="internal">
|
|
|
+ <ControlTheme x:Key="{x:Type NotificationCard}"
|
|
|
+ TargetType="NotificationCard">
|
|
|
+ <Setter Property="Background" Value="{DynamicResource NotificationCardBackgroundBrush}" />
|
|
|
+ <Setter Property="UseLayoutRounding" Value="True" />
|
|
|
+ <Setter Property="Width" Value="350" />
|
|
|
+ <Setter Property="FontSize" Value="14" />
|
|
|
+ <Setter Property="Foreground" Value="White" />
|
|
|
+ <Setter Property="RenderTransformOrigin" Value="50%,75%" />
|
|
|
+ <Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}"/>
|
|
|
+ <Setter Property="Template">
|
|
|
+ <ControlTemplate>
|
|
|
+ <LayoutTransformControl Name="PART_LayoutTransformControl"
|
|
|
+ UseRenderTransform="True">
|
|
|
+ <Border Margin="8,8,0,0"
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
+ BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
+ BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
+ CornerRadius="{TemplateBinding CornerRadius}">
|
|
|
+ <ContentControl Name="PART_Content"
|
|
|
+ MinHeight="150"
|
|
|
+ Content="{TemplateBinding Content}" />
|
|
|
+ </Border>
|
|
|
+ </LayoutTransformControl>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter>
|
|
|
+ <Style Selector="^">
|
|
|
+ <Style.Animations>
|
|
|
+ <Animation Easing="QuadraticEaseIn"
|
|
|
+ FillMode="Forward"
|
|
|
+ Duration="0:0:0.45">
|
|
|
+ <KeyFrame Cue="0%">
|
|
|
+ <Setter Property="Opacity" Value="0" />
|
|
|
+ <Setter Property="TranslateTransform.Y" Value="20" />
|
|
|
+ <Setter Property="ScaleTransform.ScaleX" Value="0.85" />
|
|
|
+ <Setter Property="ScaleTransform.ScaleY" Value="0.85" />
|
|
|
+ </KeyFrame>
|
|
|
+ <KeyFrame Cue="30%">
|
|
|
+ <Setter Property="TranslateTransform.Y" Value="-20" />
|
|
|
+ </KeyFrame>
|
|
|
+ <KeyFrame Cue="100%">
|
|
|
+ <Setter Property="Opacity" Value="1" />
|
|
|
+ <Setter Property="TranslateTransform.Y" Value="0" />
|
|
|
+ <Setter Property="ScaleTransform.ScaleX" Value="1" />
|
|
|
+ <Setter Property="ScaleTransform.ScaleY" Value="1" />
|
|
|
+ </KeyFrame>
|
|
|
+ </Animation>
|
|
|
+ </Style.Animations>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <Style Selector="^[IsClosing=true] /template/ LayoutTransformControl#PART_LayoutTransformControl">
|
|
|
+ <Setter Property="RenderTransformOrigin" Value="50%,0%" />
|
|
|
+ <Style.Animations>
|
|
|
+ <Animation Easing="QuadraticEaseOut"
|
|
|
+ FillMode="Forward"
|
|
|
+ Duration="0:0:0.75">
|
|
|
+ <KeyFrame Cue="0%">
|
|
|
+ <Setter Property="TranslateTransform.X" Value="0" />
|
|
|
+ <Setter Property="ScaleTransform.ScaleY" Value="1" />
|
|
|
+ </KeyFrame>
|
|
|
+ <KeyFrame Cue="70%">
|
|
|
+ <Setter Property="TranslateTransform.X" Value="800" />
|
|
|
+ <Setter Property="ScaleTransform.ScaleY" Value="1" />
|
|
|
+ </KeyFrame>
|
|
|
+ <KeyFrame Cue="100%">
|
|
|
+ <Setter Property="ScaleTransform.ScaleY" Value="0" />
|
|
|
+ <Setter Property="TranslateTransform.X" Value="800" />
|
|
|
+ </KeyFrame>
|
|
|
+ </Animation>
|
|
|
+ </Style.Animations>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <Style Selector="^[IsClosing=true]">
|
|
|
+ <Style.Animations>
|
|
|
+ <Animation Easing="QuadraticEaseOut"
|
|
|
+ FillMode="Forward"
|
|
|
+ Duration="0:0:1.25">
|
|
|
+ <KeyFrame Cue="100%">
|
|
|
+ <Setter Property="IsClosed" Value="True" />
|
|
|
+ </KeyFrame>
|
|
|
+ </Animation>
|
|
|
+ </Style.Animations>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <Style Selector="^:information">
|
|
|
+ <Setter Property="Background" Value="{DynamicResource NotificationCardInformationBackgroundBrush}" />
|
|
|
+ </Style>
|
|
|
+ <Style Selector="^:success">
|
|
|
+ <Setter Property="Background" Value="{DynamicResource NotificationCardSuccessBackgroundBrush}" />
|
|
|
+ </Style>
|
|
|
+ <Style Selector="^:warning">
|
|
|
+ <Setter Property="Background" Value="{DynamicResource NotificationCardWarningBackgroundBrush}" />
|
|
|
+ </Style>
|
|
|
+ <Style Selector="^:error">
|
|
|
+ <Setter Property="Background" Value="{DynamicResource NotificationCardErrorBackgroundBrush}" />
|
|
|
+ </Style>
|
|
|
+ </ControlTheme>
|
|
|
+</ResourceDictionary>
|