80 lines
4.1 KiB
XML
80 lines
4.1 KiB
XML
<Window x:Class="Raton.Windows.Notification"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
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"
|
|
Title="Notification" SizeToContent="Height" Width="360" MinWidth="260" MaxWidth="480"
|
|
WindowStyle="None" AllowsTransparency="true" Background="Transparent" ShowInTaskbar="false"
|
|
Topmost="true" WindowStartupLocation="Manual" ResizeMode="NoResize">
|
|
<FrameworkElement.Resources>
|
|
<Style x:Key="CloseBtn" TargetType="{x:Type Button}">
|
|
<Setter Property="FrameworkElement.Width" Value="22"/>
|
|
<Setter Property="FrameworkElement.Height" Value="22"/>
|
|
<Setter Property="Control.Background" Value="Transparent"/>
|
|
<Setter Property="Control.BorderThickness" Value="0"/>
|
|
<Setter Property="FrameworkElement.Cursor" Value="Hand"/>
|
|
<Setter Property="Control.Foreground" Value="#555555"/>
|
|
<Setter Property="Control.FontFamily" Value="Segoe MDL2 Assets"/>
|
|
<Setter Property="Control.FontSize" Value="10"/>
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Border x:Name="Bd" Background="{TemplateBinding Control.Background}" CornerRadius="4" Width="22"
|
|
Height="22">
|
|
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="10"
|
|
Foreground="{TemplateBinding Control.Foreground}" HorizontalAlignment="Center"
|
|
VerticalAlignment="Center" TextAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="UIElement.IsMouseOver" Value="true">
|
|
<Setter TargetName="Bd" Property="Border.Background" Value="#3A3A3A"/>
|
|
<Setter Property="Control.Foreground" Value="#CCCCCC"/>
|
|
</Trigger>
|
|
<Trigger Property="ButtonBase.IsPressed" Value="true">
|
|
<Setter TargetName="Bd" Property="Border.Background" Value="#444444"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</FrameworkElement.Resources>
|
|
<FrameworkElement.Triggers>
|
|
<EventTrigger RoutedEvent="Window.Loaded">
|
|
<BeginStoryboard x:Name="LoadSB">
|
|
<Storyboard>
|
|
<DoubleAnimation Storyboard.TargetName="RootBorder" Storyboard.TargetProperty="Opacity" From="0" To="1"
|
|
Duration="0:0:0.25">
|
|
<DoubleAnimation.EasingFunction>
|
|
<CubicEase EasingMode="EaseOut"/>
|
|
</DoubleAnimation.EasingFunction>
|
|
</DoubleAnimation>
|
|
<DoubleAnimation Storyboard.TargetName="RootBorder"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" From="14" To="0"
|
|
Duration="0:0:0.25">
|
|
<DoubleAnimation.EasingFunction>
|
|
<CubicEase EasingMode="EaseOut"/>
|
|
</DoubleAnimation.EasingFunction>
|
|
</DoubleAnimation>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</EventTrigger>
|
|
</FrameworkElement.Triggers>
|
|
<Border x:Name="RootBorder" Background="Transparent" Padding="12,6,12,12" RenderTransformOrigin="0.5,0.5">
|
|
<UIElement.RenderTransform>
|
|
<TranslateTransform Y="0"/>
|
|
</UIElement.RenderTransform>
|
|
<Border x:Name="CardBorder" Background="#1E1E1E" CornerRadius="10" Padding="0" BorderThickness="0,1,0,0">
|
|
<UIElement.Effect>
|
|
<DropShadowEffect Color="Black" BlurRadius="28" ShadowDepth="4" Opacity="0.55" Direction="270"/>
|
|
</UIElement.Effect>
|
|
<Border.BorderBrush>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
|
|
<GradientStop Color="#383838" Offset="0"/>
|
|
<GradientStop Color="#2A2A2A" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Border.BorderBrush>
|
|
<StackPanel x:Name="NotifStack" Margin="0"/>
|
|
</Border>
|
|
</Border>
|
|
</Window> |