committed by
GitHub
63 changed files with 480 additions and 777 deletions
@ -1,9 +1,9 @@ |
|||
<Styles xmlns="https://github.com/avaloniaui" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:sys="clr-namespace:System;assembly=netstandard"> |
|||
<StyleInclude Source="resm:Avalonia.Themes.Fluent.Accents.BaseDark.xaml?assembly=Avalonia.Themes.Fluent" /> |
|||
<StyleInclude Source="resm:Avalonia.Themes.Fluent.Accents.Base.xaml?assembly=Avalonia.Themes.Fluent" /> |
|||
<StyleInclude Source="resm:Avalonia.Themes.Fluent.Accents.FluentBaseDark.xaml?assembly=Avalonia.Themes.Fluent" /> |
|||
<StyleInclude Source="resm:Avalonia.Themes.Fluent.Accents.FluentControlResourcesDark.xaml?assembly=Avalonia.Themes.Fluent" /> |
|||
<StyleInclude Source="resm:Avalonia.Themes.Fluent.FluentTheme.xaml?assembly=Avalonia.Themes.Fluent" /> |
|||
<StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/BaseDark.xaml" /> |
|||
<StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/Base.xaml" /> |
|||
<StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/FluentBaseDark.xaml" /> |
|||
<StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml" /> |
|||
<StyleInclude Source="avares://Avalonia.Themes.Fluent/FluentTheme.xaml" /> |
|||
</Styles> |
|||
|
|||
@ -1,9 +1,9 @@ |
|||
<Styles xmlns="https://github.com/avaloniaui" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:sys="clr-namespace:System;assembly=netstandard"> |
|||
<StyleInclude Source="resm:Avalonia.Themes.Fluent.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Fluent" /> |
|||
<StyleInclude Source="resm:Avalonia.Themes.Fluent.Accents.Base.xaml?assembly=Avalonia.Themes.Fluent" /> |
|||
<StyleInclude Source="resm:Avalonia.Themes.Fluent.Accents.FluentBaseLight.xaml?assembly=Avalonia.Themes.Fluent" /> |
|||
<StyleInclude Source="resm:Avalonia.Themes.Fluent.Accents.FluentControlResourcesLight.xaml?assembly=Avalonia.Themes.Fluent" /> |
|||
<StyleInclude Source="resm:Avalonia.Themes.Fluent.FluentTheme.xaml?assembly=Avalonia.Themes.Fluent" /> |
|||
<StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/BaseLight.xaml" /> |
|||
<StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/Base.xaml" /> |
|||
<StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/FluentBaseLight.xaml" /> |
|||
<StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml" /> |
|||
<StyleInclude Source="avares://Avalonia.Themes.Fluent/FluentTheme.xaml" /> |
|||
</Styles> |
|||
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,92 +1,104 @@ |
|||
<Styles xmlns="https://github.com/avaloniaui" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
|||
<Style Selector="NotificationCard"> |
|||
<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="Template"> |
|||
<ControlTemplate> |
|||
<LayoutTransformControl Name="PART_LayoutTransformControl" UseRenderTransform="True"> |
|||
<Border Background="{TemplateBinding Background}" |
|||
BorderBrush="{TemplateBinding BorderBrush}" |
|||
BorderThickness="{TemplateBinding BorderThickness}" |
|||
Margin="8,8,0,0"> |
|||
<ContentControl Name="PART_Content" Content="{TemplateBinding Content}" /> |
|||
</Border> |
|||
</LayoutTransformControl> |
|||
</ControlTemplate> |
|||
</Setter> |
|||
<Design.PreviewWith> |
|||
<Border Padding="0" Background="White"> |
|||
<NotificationCard Content="Testing" /> |
|||
</Border> |
|||
</Design.PreviewWith> |
|||
<Style Selector="NotificationCard"> |
|||
<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="BorderThickness" Value="0" /> |
|||
<Setter Property="Background" Value="{DynamicResource NotificationCardBackgroundBrush}" /> |
|||
<Setter Property="Template"> |
|||
<ControlTemplate> |
|||
<LayoutTransformControl Name="PART_LayoutTransformControl" UseRenderTransform="True"> |
|||
<Border CornerRadius="{DynamicResource ControlCornerRadius}" BoxShadow="0 6 8 0 #4F000000" Margin="5 5 5 10"> |
|||
<Border Background="{TemplateBinding Background}" |
|||
BorderBrush="{TemplateBinding BorderBrush}" |
|||
BorderThickness="{TemplateBinding BorderThickness}" |
|||
CornerRadius="{DynamicResource ControlCornerRadius}" ClipToBounds="True"> |
|||
<DockPanel> |
|||
<Panel x:Name="PART_HeaderBar" Height="4" DockPanel.Dock="Top" /> |
|||
<ContentControl Name="PART_Content" Content="{TemplateBinding Content}" /> |
|||
</DockPanel> |
|||
</Border> |
|||
</Border> |
|||
</LayoutTransformControl> |
|||
</ControlTemplate> |
|||
</Setter> |
|||
|
|||
<Style.Animations> |
|||
<Animation Duration="0:0:0.45" Easing="QuadraticEaseIn" FillMode="Forward"> |
|||
<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.Animations> |
|||
<Animation Duration="0:0:0.45" Easing="QuadraticEaseIn" FillMode="Forward"> |
|||
<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="NotificationCard/template/ ContentControl#PART_Content"> |
|||
<Setter Property="MinHeight" Value="150" /> |
|||
</Style> |
|||
<Style Selector="NotificationCard/template/ ContentControl#PART_Content"> |
|||
<Setter Property="MinHeight" Value="64" /> |
|||
</Style> |
|||
|
|||
<Style Selector="NotificationCard[IsClosing=true] /template/ LayoutTransformControl#PART_LayoutTransformControl"> |
|||
<Setter Property="RenderTransformOrigin" Value="50%,0%"/> |
|||
<Style.Animations> |
|||
<Animation Duration="0:0:0.75" Easing="QuadraticEaseOut" FillMode="Forward"> |
|||
<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="NotificationCard[IsClosing=true] /template/ LayoutTransformControl#PART_LayoutTransformControl"> |
|||
<Setter Property="RenderTransformOrigin" Value="50%,0%"/> |
|||
<Style.Animations> |
|||
<Animation Duration="0:0:0.75" Easing="QuadraticEaseOut" FillMode="Forward"> |
|||
<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="NotificationCard[IsClosing=true]"> |
|||
<Style.Animations> |
|||
<Animation Duration="0:0:1.25" Easing="QuadraticEaseOut" FillMode="Forward"> |
|||
<KeyFrame Cue="100%"> |
|||
<Setter Property="IsClosed" Value="True"/> |
|||
</KeyFrame> |
|||
</Animation> |
|||
</Style.Animations> |
|||
</Style> |
|||
<Style Selector="NotificationCard[IsClosing=true]"> |
|||
<Style.Animations> |
|||
<Animation Duration="0:0:1.25" Easing="QuadraticEaseOut" FillMode="Forward"> |
|||
<KeyFrame Cue="100%"> |
|||
<Setter Property="IsClosed" Value="True"/> |
|||
</KeyFrame> |
|||
</Animation> |
|||
</Style.Animations> |
|||
</Style> |
|||
|
|||
<Style Selector="NotificationCard"> |
|||
<Setter Property="Background" Value="{DynamicResource NotificationCardBackgroundBrush}"/> |
|||
</Style> |
|||
<Style Selector="NotificationCard:information"> |
|||
<Setter Property="Background" Value="{DynamicResource NotificationCardInformationBackgroundBrush}"/> |
|||
</Style> |
|||
<Style Selector="NotificationCard:success"> |
|||
<Setter Property="Background" Value="{DynamicResource NotificationCardSuccessBackgroundBrush}"/> |
|||
</Style> |
|||
<Style Selector="NotificationCard:warning"> |
|||
<Setter Property="Background" Value="{DynamicResource NotificationCardWarningBackgroundBrush}"/> |
|||
</Style> |
|||
<Style Selector="NotificationCard:error"> |
|||
<Setter Property="Background" Value="{DynamicResource NotificationCardErrorBackgroundBrush}"/> |
|||
</Style> |
|||
<Style Selector="NotificationCard /template/ Panel#PART_HeaderBar"> |
|||
<Setter Property="Background" Value="{DynamicResource NotificationCardProgressBackgroundBrush}"/> |
|||
</Style> |
|||
<Style Selector="NotificationCard:information /template/ Panel#PART_HeaderBar"> |
|||
<Setter Property="Background" Value="{DynamicResource NotificationCardInformationBackgroundBrush}"/> |
|||
</Style> |
|||
<Style Selector="NotificationCard:success /template/ Panel#PART_HeaderBar"> |
|||
<Setter Property="Background" Value="{DynamicResource NotificationCardSuccessBackgroundBrush}"/> |
|||
</Style> |
|||
<Style Selector="NotificationCard:warning /template/ Panel#PART_HeaderBar"> |
|||
<Setter Property="Background" Value="{DynamicResource NotificationCardWarningBackgroundBrush}"/> |
|||
</Style> |
|||
<Style Selector="NotificationCard:error /template/ Panel#PART_HeaderBar"> |
|||
<Setter Property="Background" Value="{DynamicResource NotificationCardErrorBackgroundBrush}"/> |
|||
</Style> |
|||
</Styles> |
|||
|
|||
@ -1,45 +1,45 @@ |
|||
<Styles xmlns="https://github.com/avaloniaui" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
|||
<Style Selector="WindowNotificationManager"> |
|||
<Setter Property="Margin" Value="0 0 8 8"/> |
|||
<Setter Property="Template"> |
|||
<ControlTemplate> |
|||
<ReversibleStackPanel Name="PART_Items"> |
|||
<ReversibleStackPanel.DataTemplates> |
|||
<DataTemplate DataType="INotification"> |
|||
<StackPanel Spacing="8" Margin="12"> |
|||
<TextBlock Text="{Binding Title}" FontWeight="Medium" /> |
|||
<TextBlock MaxHeight="80" Text="{Binding Message}" TextWrapping="Wrap" Margin="0,0,12,0"/> |
|||
</StackPanel> |
|||
</DataTemplate> |
|||
<DataTemplate DataType="x:String"> |
|||
<TextBlock Text="{Binding }" Margin="12" /> |
|||
</DataTemplate> |
|||
</ReversibleStackPanel.DataTemplates> |
|||
</ReversibleStackPanel> |
|||
</ControlTemplate> |
|||
</Setter> |
|||
</Style> |
|||
<Style Selector="WindowNotificationManager"> |
|||
<Setter Property="Margin" Value="0 0"/> |
|||
<Setter Property="Template"> |
|||
<ControlTemplate> |
|||
<ReversibleStackPanel Name="PART_Items"> |
|||
<ReversibleStackPanel.DataTemplates> |
|||
<DataTemplate DataType="INotification"> |
|||
<StackPanel Spacing="8" Margin="12" TextBlock.Foreground="{DynamicResource SystemControlForegroundBaseHighBrush}"> |
|||
<TextBlock Text="{Binding Title}" FontWeight="Medium" /> |
|||
<TextBlock MaxHeight="80" Text="{Binding Message}" TextWrapping="Wrap" Margin="0,0,12,0"/> |
|||
</StackPanel> |
|||
</DataTemplate> |
|||
<DataTemplate DataType="x:String"> |
|||
<TextBlock Text="{Binding }" Margin="12" Foreground="{DynamicResource SystemControlForegroundBaseHighBrush}" /> |
|||
</DataTemplate> |
|||
</ReversibleStackPanel.DataTemplates> |
|||
</ReversibleStackPanel> |
|||
</ControlTemplate> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
<Style Selector="WindowNotificationManager:topleft /template/ ReversibleStackPanel#PART_Items"> |
|||
<Setter Property="VerticalAlignment" Value="Top"/> |
|||
<Setter Property="HorizontalAlignment" Value="Left"/> |
|||
</Style> |
|||
<Style Selector="WindowNotificationManager:topleft /template/ ReversibleStackPanel#PART_Items"> |
|||
<Setter Property="VerticalAlignment" Value="Top"/> |
|||
<Setter Property="HorizontalAlignment" Value="Left"/> |
|||
</Style> |
|||
|
|||
<Style Selector="WindowNotificationManager:topright /template/ ReversibleStackPanel#PART_Items"> |
|||
<Setter Property="VerticalAlignment" Value="Top"/> |
|||
<Setter Property="HorizontalAlignment" Value="Right"/> |
|||
</Style> |
|||
<Style Selector="WindowNotificationManager:topright /template/ ReversibleStackPanel#PART_Items"> |
|||
<Setter Property="VerticalAlignment" Value="Top"/> |
|||
<Setter Property="HorizontalAlignment" Value="Right"/> |
|||
</Style> |
|||
|
|||
<Style Selector="WindowNotificationManager:bottomleft /template/ ReversibleStackPanel#PART_Items"> |
|||
<Setter Property="ReverseOrder" Value="True"/> |
|||
<Setter Property="VerticalAlignment" Value="Bottom"/> |
|||
<Setter Property="HorizontalAlignment" Value="Left"/> |
|||
</Style> |
|||
<Style Selector="WindowNotificationManager:bottomleft /template/ ReversibleStackPanel#PART_Items"> |
|||
<Setter Property="ReverseOrder" Value="True"/> |
|||
<Setter Property="VerticalAlignment" Value="Bottom"/> |
|||
<Setter Property="HorizontalAlignment" Value="Left"/> |
|||
</Style> |
|||
|
|||
<Style Selector="WindowNotificationManager:bottomright /template/ ReversibleStackPanel#PART_Items"> |
|||
<Setter Property="ReverseOrder" Value="True"/> |
|||
<Setter Property="VerticalAlignment" Value="Bottom"/> |
|||
<Setter Property="HorizontalAlignment" Value="Right"/> |
|||
</Style> |
|||
<Style Selector="WindowNotificationManager:bottomright /template/ ReversibleStackPanel#PART_Items"> |
|||
<Setter Property="ReverseOrder" Value="True"/> |
|||
<Setter Property="VerticalAlignment" Value="Bottom"/> |
|||
<Setter Property="HorizontalAlignment" Value="Right"/> |
|||
</Style> |
|||
</Styles> |
|||
|
|||
Loading…
Reference in new issue