|
|
|
|
@@ -4,6 +4,8 @@
|
|
|
|
|
xmlns:u="https://irihi.tech/ursa">
|
|
|
|
|
<!-- Add Resources Here -->
|
|
|
|
|
<ControlTheme x:Key="{x:Type u:Banner}" TargetType="u:Banner">
|
|
|
|
|
<Setter Property="u:Banner.BorderThickness" Value="{DynamicResource BannerBorderThickness}" />
|
|
|
|
|
<Setter Property="u:Banner.BorderBrush" Value="Transparent" />
|
|
|
|
|
<Setter Property="u:Banner.HorizontalContentAlignment" Value="Center" />
|
|
|
|
|
<Setter Property="u:Banner.Template">
|
|
|
|
|
<ControlTemplate TargetType="u:Banner">
|
|
|
|
|
@@ -23,6 +25,7 @@
|
|
|
|
|
Grid.Row="0"
|
|
|
|
|
Grid.RowSpan="2"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Margin="{DynamicResource BannerIconMargin}"
|
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
|
IsVisible="{TemplateBinding ShowIcon}">
|
|
|
|
|
<ContentPresenter Content="{TemplateBinding Icon}" />
|
|
|
|
|
@@ -50,32 +53,70 @@
|
|
|
|
|
<Button
|
|
|
|
|
Name="{x:Static u:Banner.PART_CloseButton}"
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
Padding="4"
|
|
|
|
|
Cursor="Hand"
|
|
|
|
|
IsVisible="{TemplateBinding CanClose}"
|
|
|
|
|
Theme="{DynamicResource BorderlessButton}">
|
|
|
|
|
<PathIcon
|
|
|
|
|
Width="12"
|
|
|
|
|
Height="12"
|
|
|
|
|
Data="{DynamicResource BannerCloseIconGeometry}"
|
|
|
|
|
Foreground="Black" />
|
|
|
|
|
Foreground="{DynamicResource BannerCloseButtonForeground}" />
|
|
|
|
|
</Button>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter>
|
|
|
|
|
<Style Selector="^[Type=Information]">
|
|
|
|
|
<Style Selector="^.Bordered /template/ Border#PART_Container">
|
|
|
|
|
<Setter Property="Border.CornerRadius" Value="{DynamicResource BannerCornerRadius}" />
|
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BannerInformationBorderBrush}" />
|
|
|
|
|
</Style>
|
|
|
|
|
<Style Selector="^ /template/ Border#PART_Container">
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource BannerInformationBackground}" />
|
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BannerInformationBorderBrush}" />
|
|
|
|
|
</Style>
|
|
|
|
|
<Style Selector="^ /template/ PathIcon#PART_BuildInIcon">
|
|
|
|
|
<Setter Property="PathIcon.Data" Value="{DynamicResource BannerInformationIconGeometry}" />
|
|
|
|
|
<Setter Property="PathIcon.Foreground" Value="{DynamicResource BannerInformationBorderBrush}" />
|
|
|
|
|
</Style>
|
|
|
|
|
</Style>
|
|
|
|
|
<Style Selector="^.Bordered">
|
|
|
|
|
<Style Selector="^ /template/ Border#PART_Container">
|
|
|
|
|
<Style Selector="^[Type=Warning]">
|
|
|
|
|
<Style Selector="^.Bordered /template/ Border#PART_Container">
|
|
|
|
|
<Setter Property="Border.CornerRadius" Value="{DynamicResource BannerCornerRadius}" />
|
|
|
|
|
<Setter Property="Border.BorderThickness" Value="{DynamicResource BannerBorderThickness}" />
|
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BannerWarningBorderBrush}" />
|
|
|
|
|
</Style>
|
|
|
|
|
<Style Selector="^ /template/ Border#PART_Container">
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource BannerWarningBackground}" />
|
|
|
|
|
</Style>
|
|
|
|
|
<Style Selector="^ /template/ PathIcon#PART_BuildInIcon">
|
|
|
|
|
<Setter Property="PathIcon.Data" Value="{DynamicResource BannerWarningIconGeometry}" />
|
|
|
|
|
<Setter Property="PathIcon.Foreground" Value="{DynamicResource BannerWarningBorderBrush}" />
|
|
|
|
|
</Style>
|
|
|
|
|
</Style>
|
|
|
|
|
<Style Selector="^[Type=Error]">
|
|
|
|
|
<Style Selector="^.Bordered /template/ Border#PART_Container">
|
|
|
|
|
<Setter Property="Border.CornerRadius" Value="{DynamicResource BannerCornerRadius}" />
|
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BannerErrorBorderBrush}" />
|
|
|
|
|
</Style>
|
|
|
|
|
<Style Selector="^ /template/ Border#PART_Container">
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource BannerErrorBackground}" />
|
|
|
|
|
</Style>
|
|
|
|
|
<Style Selector="^ /template/ PathIcon#PART_BuildInIcon">
|
|
|
|
|
<Setter Property="PathIcon.Data" Value="{DynamicResource BannerErrorIconGeometry}" />
|
|
|
|
|
<Setter Property="PathIcon.Foreground" Value="{DynamicResource BannerErrorBorderBrush}" />
|
|
|
|
|
</Style>
|
|
|
|
|
</Style>
|
|
|
|
|
<Style Selector="^[Type=Success]">
|
|
|
|
|
<Style Selector="^.Bordered /template/ Border#PART_Container">
|
|
|
|
|
<Setter Property="Border.CornerRadius" Value="{DynamicResource BannerCornerRadius}" />
|
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BannerSuccessBorderBrush}" />
|
|
|
|
|
</Style>
|
|
|
|
|
<Style Selector="^ /template/ Border#PART_Container">
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource BannerSuccessBackground}" />
|
|
|
|
|
</Style>
|
|
|
|
|
<Style Selector="^ /template/ PathIcon#PART_BuildInIcon">
|
|
|
|
|
<Setter Property="PathIcon.Data" Value="{DynamicResource BannerSuccessIconGeometry}" />
|
|
|
|
|
<Setter Property="PathIcon.Foreground" Value="{DynamicResource BannerSuccessBorderBrush}" />
|
|
|
|
|
</Style>
|
|
|
|
|
</Style>
|
|
|
|
|
</ControlTheme>
|
|
|
|
|
|