Initial commit.
This commit is contained in:
19
Wino.Mail/Styles/Colors.xaml
Normal file
19
Wino.Mail/Styles/Colors.xaml
Normal file
@@ -0,0 +1,19 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<SolidColorBrush x:Key="FlaggedBrush">#e74c3c</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="DeleteBrush">#e74c3c</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="AttentionBrush">#ff7675</SolidColorBrush>
|
||||
|
||||
<SolidColorBrush x:Key="FolderSyncBrush">#1abc9c</SolidColorBrush>
|
||||
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary x:Name="Light">
|
||||
<SolidColorBrush x:Key="AttachmentBrush">#fdcb6e</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="SettingsPaneBorderBrush">#636e72</SolidColorBrush>
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Name="Dark">
|
||||
<SolidColorBrush x:Key="AttachmentBrush">#fdcb6e</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="SettingsPaneBorderBrush">#2d3436</SolidColorBrush>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
</ResourceDictionary>
|
||||
158
Wino.Mail/Styles/CommandBarItems.xaml
Normal file
158
Wino.Mail/Styles/CommandBarItems.xaml
Normal file
@@ -0,0 +1,158 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:domain="using:Wino.Core.Domain"
|
||||
x:Class="Wino.Styles.CommandBarItems"
|
||||
xmlns:controls="using:Wino.Controls">
|
||||
|
||||
<!-- TODO: Localize -->
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemSeperatorTemplate">
|
||||
<AppBarSeparator />
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemReplyTemplate">
|
||||
<AppBarButton Label="{x:Bind domain:Translator.MailOperation_Reply}">
|
||||
<AppBarButton.Icon>
|
||||
<controls:WinoFontIcon Icon="Reply" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemReplyAllTemplate">
|
||||
<AppBarButton Label="{x:Bind domain:Translator.MailOperation_ReplyAll}">
|
||||
<AppBarButton.Icon>
|
||||
<controls:WinoFontIcon Icon="ReplyAll" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemLightEditorTemplate">
|
||||
<AppBarButton LabelPosition="Collapsed">
|
||||
<AppBarButton.Icon>
|
||||
<controls:WinoFontIcon Icon="LightEditor" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemDarkEditorTemplate">
|
||||
<AppBarButton LabelPosition="Collapsed">
|
||||
<AppBarButton.Icon>
|
||||
<controls:WinoFontIcon Icon="DarkEditor" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemForwardTemplate">
|
||||
<AppBarButton Label="{x:Bind domain:Translator.MailOperation_Forward}">
|
||||
<AppBarButton.Icon>
|
||||
<controls:WinoFontIcon Icon="Forward" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemSaveTemplate">
|
||||
<AppBarButton Label="{x:Bind domain:Translator.MailOperation_ExportPDF}">
|
||||
<AppBarButton.Icon>
|
||||
<controls:WinoFontIcon Icon="Save" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemArchiveTemplate">
|
||||
<AppBarButton Label="{x:Bind domain:Translator.MailOperation_Archive}">
|
||||
<AppBarButton.Icon>
|
||||
<controls:WinoFontIcon Icon="Archive" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemUnarchiveTemplate">
|
||||
<AppBarButton Label="{x:Bind domain:Translator.MailOperation_Unarchive}">
|
||||
<AppBarButton.Icon>
|
||||
<controls:WinoFontIcon Icon="UnArchive" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemSetFlagTemplate">
|
||||
<AppBarButton Label="{x:Bind domain:Translator.MailOperation_SetFlag}">
|
||||
<AppBarButton.Icon>
|
||||
<controls:WinoFontIcon Icon="Flag" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemClearFlagTemplate">
|
||||
<AppBarButton Label="{x:Bind domain:Translator.MailOperation_ClearFlag}">
|
||||
<AppBarButton.Icon>
|
||||
<controls:WinoFontIcon Icon="ClearFlag" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemMarkReadTemplate">
|
||||
<AppBarButton Label="{x:Bind domain:Translator.MailOperation_MarkAsRead}">
|
||||
<AppBarButton.Icon>
|
||||
<controls:WinoFontIcon Icon="MarkRead" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemMarkUnreadTemplate">
|
||||
<AppBarButton Label="{x:Bind domain:Translator.MailOperation_MarkAsUnread}">
|
||||
<AppBarButton.Icon>
|
||||
<controls:WinoFontIcon Icon="MarkUnread" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemDeleteTemplate">
|
||||
<AppBarButton Label="{x:Bind domain:Translator.MailOperation_Delete}">
|
||||
<AppBarButton.Icon>
|
||||
<controls:WinoFontIcon Icon="Delete" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemMoveTemplate">
|
||||
<AppBarButton Label="{x:Bind domain:Translator.MailOperation_Move}">
|
||||
<AppBarButton.Icon>
|
||||
<controls:WinoFontIcon Icon="Forward" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemMoveToJunkTemplate">
|
||||
<AppBarButton Label="{x:Bind domain:Translator.MailOperation_MoveJunk}">
|
||||
<AppBarButton.Icon>
|
||||
<controls:WinoFontIcon Icon="Junk" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemZoomTemplate">
|
||||
<AppBarButton Label="{x:Bind domain:Translator.MailOperation_Zoom}">
|
||||
<AppBarButton.Icon>
|
||||
<controls:WinoFontIcon Icon="Zoom" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemPrintTemplate">
|
||||
<AppBarButton Label="{x:Bind domain:Translator.MailOperation_Print}">
|
||||
<AppBarButton.Icon>
|
||||
<SymbolIcon Symbol="Print" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CommandBarItemFindTemplate">
|
||||
<AppBarButton Label="{x:Bind domain:Translator.MailOperation_Find}">
|
||||
<AppBarButton.Icon>
|
||||
<controls:WinoFontIcon Icon="Find" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
||||
12
Wino.Mail/Styles/CommandBarItems.xaml.cs
Normal file
12
Wino.Mail/Styles/CommandBarItems.xaml.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Windows.UI.Xaml;
|
||||
|
||||
namespace Wino.Styles
|
||||
{
|
||||
public partial class CommandBarItems : ResourceDictionary
|
||||
{
|
||||
public CommandBarItems()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
32
Wino.Mail/Styles/ContentPresenters.xaml
Normal file
32
Wino.Mail/Styles/ContentPresenters.xaml
Normal file
@@ -0,0 +1,32 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Wino.Controls">
|
||||
|
||||
<!-- Flagged -->
|
||||
<DataTemplate x:Key="FlaggedSymbolControlTemplate">
|
||||
<Viewbox
|
||||
Width="14"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top">
|
||||
<controls:WinoFontIcon
|
||||
Margin="2,0,0,0"
|
||||
Foreground="{StaticResource FlaggedBrush}"
|
||||
Icon="Flag" />
|
||||
</Viewbox>
|
||||
</DataTemplate>
|
||||
|
||||
<!-- Attachments -->
|
||||
<DataTemplate x:Key="AttachmentSymbolControlTemplate">
|
||||
<Viewbox
|
||||
x:Name="AttachmentSymbol"
|
||||
Width="14"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Bottom">
|
||||
<controls:WinoFontIcon
|
||||
Margin="2,0,0,0"
|
||||
Foreground="{StaticResource AttachmentBrush}"
|
||||
Icon="SpecialFolderCategory" />
|
||||
</Viewbox>
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
||||
7
Wino.Mail/Styles/Converters.xaml
Normal file
7
Wino.Mail/Styles/Converters.xaml
Normal file
@@ -0,0 +1,7 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="using:Wino.Converters">
|
||||
<converters:ReverseBooleanToVisibilityConverter x:Key="ReverseBooleanToVisibilityConverter" />
|
||||
<converters:ReverseBooleanConverter x:Key="ReverseBooleanConverter" />
|
||||
</ResourceDictionary>
|
||||
29
Wino.Mail/Styles/FontIcons.xaml
Normal file
29
Wino.Mail/Styles/FontIcons.xaml
Normal file
File diff suppressed because one or more lines are too long
44
Wino.Mail/Styles/ImagePreviewControl.xaml
Normal file
44
Wino.Mail/Styles/ImagePreviewControl.xaml
Normal file
@@ -0,0 +1,44 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Wino.Controls">
|
||||
|
||||
<Style TargetType="controls:ImagePreviewControl">
|
||||
<Style.Setters>
|
||||
<Setter Property="Width" Value="34" />
|
||||
<Setter Property="Height" Value="34" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="controls:ImagePreviewControl">
|
||||
<Grid>
|
||||
<!-- Ellipse Initials -->
|
||||
<Grid x:Name="EllipseInitialsGrid">
|
||||
<Ellipse
|
||||
x:Name="Ellipse"
|
||||
Grid.RowSpan="2"
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
<TextBlock
|
||||
x:Name="InitialsTextBlock"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="White" />
|
||||
</Grid>
|
||||
|
||||
<Image
|
||||
x:Name="KnownHostImage"
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Stretch="UniformToFill" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style.Setters>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
291
Wino.Mail/Styles/ItemContainerStyles.xaml
Normal file
291
Wino.Mail/Styles/ItemContainerStyles.xaml
Normal file
@@ -0,0 +1,291 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:primitiveContract7Present="using:Microsoft.UI.Xaml.Controls.Primitives?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)"
|
||||
xmlns:muxc="using:Microsoft.UI.Xaml.Controls">
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary x:Key="Light">
|
||||
<SolidColorBrush x:Key="MailItemFlaggedBackgroundBrush" Color="#ffffcc" />
|
||||
<SolidColorBrush x:Key="InformationBrush">#34495e</SolidColorBrush>
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Key="Dark">
|
||||
<SolidColorBrush x:Key="MailItemFlaggedBackgroundBrush" Color="#576574" />
|
||||
<SolidColorBrush x:Key="InformationBrush">#ecf0f1</SolidColorBrush>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
|
||||
<!-- Horizontally Stretched List View Item Container Style -->
|
||||
<Style x:Key="StretchedItemContainerStyle" TargetType="ListViewItem">
|
||||
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
||||
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
|
||||
<Setter Property="Background" Value="{ThemeResource ListViewItemBackground}" />
|
||||
<Setter Property="Foreground" Value="{ThemeResource ListViewItemForeground}" />
|
||||
<Setter Property="TabNavigation" Value="Local" />
|
||||
<Setter Property="IsHoldingEnabled" Value="True" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="MinWidth" Value="{ThemeResource ListViewItemMinWidth}" />
|
||||
<Setter Property="MinHeight" Value="{ThemeResource ListViewItemMinHeight}" />
|
||||
<Setter Property="AllowDrop" Value="False" />
|
||||
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
|
||||
<Setter Property="FocusVisualMargin" Value="0" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListViewItem">
|
||||
<ListViewItemPresenter
|
||||
x:Name="Root"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
CheckBoxBrush="{ThemeResource ListViewItemCheckBoxBrush}"
|
||||
CheckBrush="{ThemeResource ListViewItemCheckBrush}"
|
||||
CheckMode="{ThemeResource ListViewItemCheckMode}"
|
||||
ContentMargin="{TemplateBinding Padding}"
|
||||
ContentTransitions="{TemplateBinding ContentTransitions}"
|
||||
Control.IsTemplateFocusTarget="True"
|
||||
DisabledOpacity="{ThemeResource ListViewItemDisabledThemeOpacity}"
|
||||
DragBackground="{ThemeResource ListViewItemDragBackground}"
|
||||
DragForeground="{ThemeResource ListViewItemDragForeground}"
|
||||
DragOpacity="{ThemeResource ListViewItemDragThemeOpacity}"
|
||||
FocusBorderBrush="{ThemeResource ListViewItemFocusBorderBrush}"
|
||||
FocusSecondaryBorderBrush="{ThemeResource ListViewItemFocusSecondaryBorderBrush}"
|
||||
FocusVisualMargin="{TemplateBinding FocusVisualMargin}"
|
||||
PlaceholderBackground="{ThemeResource ListViewItemPlaceholderBackground}"
|
||||
PointerOverBackground="{ThemeResource ListViewItemBackgroundPointerOver}"
|
||||
PointerOverForeground="{ThemeResource ListViewItemForegroundPointerOver}"
|
||||
PressedBackground="{ThemeResource ListViewItemBackgroundPressed}"
|
||||
ReorderHintOffset="{ThemeResource ListViewItemReorderHintThemeOffset}"
|
||||
RevealBackground="{ThemeResource ListViewItemRevealBackground}"
|
||||
RevealBorderBrush="{ThemeResource ListViewItemRevealBorderBrush}"
|
||||
RevealBorderThickness="{ThemeResource ListViewItemRevealBorderThemeThickness}"
|
||||
SelectedBackground="{ThemeResource ListViewItemBackgroundSelected}"
|
||||
SelectedForeground="{ThemeResource ListViewItemForegroundSelected}"
|
||||
SelectedPointerOverBackground="{ThemeResource ListViewItemBackgroundSelectedPointerOver}"
|
||||
SelectedPressedBackground="{ThemeResource ListViewItemBackgroundSelectedPressed}"
|
||||
SelectionCheckMarkVisualEnabled="{ThemeResource ListViewItemSelectionCheckMarkVisualEnabled}">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Selected" />
|
||||
<VisualState x:Name="PointerOver">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Root.(RevealBrush.State)" Value="PointerOver" />
|
||||
<Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPointerOver}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="PointerOverSelected">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Root.(RevealBrush.State)" Value="PointerOver" />
|
||||
<Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPointerOver}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="PointerOverPressed">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
|
||||
<Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Pressed">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
|
||||
<Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="PressedSelected">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
|
||||
<Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
<VisualStateGroup x:Name="DisabledStates">
|
||||
<VisualState x:Name="Enabled" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Root.RevealBorderThickness" Value="0" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</ListViewItemPresenter>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- Mail List Header Item Style -->
|
||||
<Style x:Key="MailListHeaderStyle" TargetType="ListViewHeaderItem">
|
||||
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
||||
<Setter Property="FontSize" Value="{ThemeResource ListViewHeaderItemThemeFontSize}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Margin" Value="0,0,0,0" />
|
||||
<Setter Property="MinHeight" Value="0" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="UseSystemFocusVisuals" Value="True" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListViewHeaderItem">
|
||||
<Grid
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<ContentPresenter
|
||||
x:Name="ContentPresenter"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
ContentTransitions="{TemplateBinding ContentTransitions}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- Clickable account navigation view item style -->
|
||||
<!-- This introduces custom selector pipe for multi selection in NavigationView in shell. -->
|
||||
|
||||
<Style x:Key="SingleAccountNavigationViewItemTemplate" TargetType="muxc:NavigationViewItem">
|
||||
<Setter Property="Foreground" Value="{ThemeResource NavigationViewItemForeground}" />
|
||||
<Setter Property="Background" Value="{ThemeResource NavigationViewItemBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{ThemeResource NavigationViewItemBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="{StaticResource NavigationViewItemBorderThickness}" />
|
||||
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
||||
<Setter Property="FontWeight" Value="Normal" />
|
||||
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
|
||||
<Setter Property="Margin" Value="{ThemeResource NavigationViewItemMargin}" />
|
||||
<Setter Property="UseSystemFocusVisuals" Value="True" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="TabNavigation" Value="Once" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="muxc:NavigationViewItem">
|
||||
<Grid x:Name="NVIRootGrid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<FlyoutBase.AttachedFlyout>
|
||||
<Flyout x:Name="ChildrenFlyout" Placement="Right">
|
||||
<Flyout.FlyoutPresenterStyle>
|
||||
<Style TargetType="FlyoutPresenter">
|
||||
<Setter Property="Padding" Value="{ThemeResource NavigationViewItemChildrenMenuFlyoutPadding}" />
|
||||
<Setter Property="Margin" Value="0,-4,0,0" />
|
||||
<Setter Property="ScrollViewer.HorizontalScrollMode" Value="Auto" />
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
|
||||
<Setter Property="ScrollViewer.VerticalScrollMode" Value="Auto" />
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
||||
<Setter Property="ScrollViewer.ZoomMode" Value="Disabled" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="FlyoutPresenter">
|
||||
<ScrollViewer
|
||||
x:Name="ScrollViewer"
|
||||
AutomationProperties.AccessibilityView="Raw"
|
||||
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
||||
HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
|
||||
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
|
||||
VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
|
||||
ZoomMode="{TemplateBinding ScrollViewer.ZoomMode}">
|
||||
<ContentPresenter
|
||||
x:Name="ContentPresenter"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{ThemeResource OverlayCornerRadius}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTransitions="{TemplateBinding ContentTransitions}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
||||
</ScrollViewer>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Flyout.FlyoutPresenterStyle>
|
||||
<Grid x:Name="FlyoutRootGrid">
|
||||
<Grid x:Name="FlyoutContentGrid" />
|
||||
</Grid>
|
||||
</Flyout>
|
||||
</FlyoutBase.AttachedFlyout>
|
||||
<primitiveContract7Present:NavigationViewItemPresenter
|
||||
x:Name="NavigationViewItemPresenter"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
|
||||
ContentTransitions="{TemplateBinding ContentTransitions}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
IsTabStop="false"
|
||||
Icon="{TemplateBinding Icon}"
|
||||
InfoBadge="{TemplateBinding InfoBadge}"
|
||||
Control.IsTemplateFocusTarget="True"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
UseSystemFocusVisuals="{TemplateBinding UseSystemFocusVisuals}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalAlignment}" />
|
||||
<muxc:ItemsRepeater
|
||||
x:Name="NavigationViewItemMenuItemsHost"
|
||||
Grid.Row="1"
|
||||
Visibility="Collapsed"
|
||||
x:Load="False">
|
||||
<muxc:ItemsRepeater.Layout>
|
||||
<muxc:StackLayout Orientation="Vertical" />
|
||||
</muxc:ItemsRepeater.Layout>
|
||||
</muxc:ItemsRepeater>
|
||||
|
||||
<!-- Custom selecotr pipe. -->
|
||||
<Rectangle
|
||||
x:Name="SelectionIndicator"
|
||||
Width="3"
|
||||
Opacity="1"
|
||||
HorizontalAlignment="Left"
|
||||
Visibility="Collapsed"
|
||||
Margin="4,12"
|
||||
Scale="0,0,0"
|
||||
Fill="{ThemeResource NavigationViewSelectionIndicatorForeground}"
|
||||
RadiusX="2"
|
||||
RadiusY="2">
|
||||
<Rectangle.ScaleTransition>
|
||||
<Vector3Transition />
|
||||
</Rectangle.ScaleTransition>
|
||||
</Rectangle>
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="ItemOnNavigationViewListPositionStates">
|
||||
<VisualState x:Name="OnLeftNavigation">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="NavigationViewItemPresenter.Style" Value="{StaticResource MUX_NavigationViewItemPresenterStyleWhenOnLeftPane}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="OnTopNavigationPrimary">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="NavigationViewItemPresenter.Margin" Value="{ThemeResource TopNavigationViewItemMargin}" />
|
||||
<Setter Target="NavigationViewItemPresenter.Style" Value="{StaticResource MUX_NavigationViewItemPresenterStyleWhenOnTopPane}" />
|
||||
<Setter Target="ChildrenFlyout.Placement" Value="Bottom" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="OnTopNavigationOverflow">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="NavigationViewItemPresenter.Style" Value="{StaticResource MUX_NavigationViewItemPresenterStyleWhenOnTopPaneOverflow}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
422
Wino.Mail/Styles/WinoInfoBar.xaml
Normal file
422
Wino.Mail/Styles/WinoInfoBar.xaml
Normal file
@@ -0,0 +1,422 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:contract7Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)"
|
||||
xmlns:controls="using:Wino.Controls"
|
||||
xmlns:local="using:Microsoft.UI.Xaml.Controls"
|
||||
xmlns:primitives="using:Microsoft.UI.Xaml.Controls.Primitives">
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary x:Key="Light">
|
||||
<SolidColorBrush x:Key="InfoBarCustomInformationalBackground">#74b9ff</SolidColorBrush>
|
||||
|
||||
<StaticResource x:Key="InfoBarErrorSeverityBackgroundBrush" ResourceKey="SystemFillColorCriticalBackgroundBrush" />
|
||||
<StaticResource x:Key="InfoBarWarningSeverityBackgroundBrush" ResourceKey="SystemFillColorCautionBackgroundBrush" />
|
||||
<StaticResource x:Key="InfoBarSuccessSeverityBackgroundBrush" ResourceKey="SystemFillColorSuccessBackgroundBrush" />
|
||||
<StaticResource x:Key="InfoBarInformationalSeverityBackgroundBrush" ResourceKey="InfoBarCustomInformationalBackground" />
|
||||
|
||||
<StaticResource x:Key="InfoBarErrorSeverityIconBackground" ResourceKey="SystemFillColorCriticalBrush" />
|
||||
<StaticResource x:Key="InfoBarWarningSeverityIconBackground" ResourceKey="SystemFillColorCautionBrush" />
|
||||
<StaticResource x:Key="InfoBarSuccessSeverityIconBackground" ResourceKey="SystemFillColorSuccessBrush" />
|
||||
<StaticResource x:Key="InfoBarInformationalSeverityIconBackground" ResourceKey="SystemFillColorAttentionBrush" />
|
||||
|
||||
<StaticResource x:Key="InfoBarErrorSeverityIconForeground" ResourceKey="TextFillColorInverseBrush" />
|
||||
<StaticResource x:Key="InfoBarWarningSeverityIconForeground" ResourceKey="TextFillColorInverseBrush" />
|
||||
<StaticResource x:Key="InfoBarSuccessSeverityIconForeground" ResourceKey="TextFillColorInverseBrush" />
|
||||
<StaticResource x:Key="InfoBarInformationalSeverityIconForeground" ResourceKey="TextFillColorInverseBrush" />
|
||||
|
||||
<StaticResource x:Key="InfoBarTitleForeground" ResourceKey="TextFillColorPrimaryBrush" />
|
||||
<StaticResource x:Key="InfoBarMessageForeground" ResourceKey="TextFillColorPrimaryBrush" />
|
||||
<StaticResource x:Key="InfoBarHyperlinkButtonForeground" ResourceKey="AccentTextFillColorPrimaryBrush" />
|
||||
|
||||
<StaticResource x:Key="InfoBarBorderBrush" ResourceKey="CardStrokeColorDefaultBrush" />
|
||||
<Thickness x:Key="InfoBarBorderThickness">1</Thickness>
|
||||
</ResourceDictionary>
|
||||
|
||||
<ResourceDictionary x:Key="Dark">
|
||||
<SolidColorBrush x:Key="InfoBarCustomInformationalBackground">#3867d6</SolidColorBrush>
|
||||
|
||||
<StaticResource x:Key="InfoBarErrorSeverityBackgroundBrush" ResourceKey="SystemFillColorCriticalBackgroundBrush" />
|
||||
<StaticResource x:Key="InfoBarWarningSeverityBackgroundBrush" ResourceKey="SystemFillColorCautionBackgroundBrush" />
|
||||
<StaticResource x:Key="InfoBarSuccessSeverityBackgroundBrush" ResourceKey="SystemFillColorSuccessBackgroundBrush" />
|
||||
<StaticResource x:Key="InfoBarInformationalSeverityBackgroundBrush" ResourceKey="InfoBarCustomInformationalBackground" />
|
||||
|
||||
<StaticResource x:Key="InfoBarErrorSeverityIconBackground" ResourceKey="SystemFillColorCriticalBrush" />
|
||||
<StaticResource x:Key="InfoBarWarningSeverityIconBackground" ResourceKey="SystemFillColorCautionBrush" />
|
||||
<StaticResource x:Key="InfoBarSuccessSeverityIconBackground" ResourceKey="SystemFillColorSuccessBrush" />
|
||||
<StaticResource x:Key="InfoBarInformationalSeverityIconBackground" ResourceKey="SystemFillColorAttentionBrush" />
|
||||
|
||||
<StaticResource x:Key="InfoBarErrorSeverityIconForeground" ResourceKey="TextFillColorInverseBrush" />
|
||||
<StaticResource x:Key="InfoBarWarningSeverityIconForeground" ResourceKey="TextFillColorInverseBrush" />
|
||||
<StaticResource x:Key="InfoBarSuccessSeverityIconForeground" ResourceKey="TextFillColorInverseBrush" />
|
||||
<StaticResource x:Key="InfoBarInformationalSeverityIconForeground" ResourceKey="TextFillColorInverseBrush" />
|
||||
|
||||
<StaticResource x:Key="InfoBarTitleForeground" ResourceKey="TextFillColorPrimaryBrush" />
|
||||
<StaticResource x:Key="InfoBarMessageForeground" ResourceKey="TextFillColorPrimaryBrush" />
|
||||
<StaticResource x:Key="InfoBarHyperlinkButtonForeground" ResourceKey="AccentTextFillColorPrimaryBrush" />
|
||||
|
||||
<StaticResource x:Key="InfoBarBorderBrush" ResourceKey="CardStrokeColorDefaultBrush" />
|
||||
<Thickness x:Key="InfoBarBorderThickness">1</Thickness>
|
||||
</ResourceDictionary>
|
||||
|
||||
<ResourceDictionary x:Key="HighContrast">
|
||||
<SolidColorBrush x:Key="InfoBarErrorSeverityBackgroundBrush" Color="{ThemeResource SystemColorWindowColor}" />
|
||||
<SolidColorBrush x:Key="InfoBarWarningSeverityBackgroundBrush" Color="{ThemeResource SystemColorWindowColor}" />
|
||||
<SolidColorBrush x:Key="InfoBarSuccessSeverityBackgroundBrush" Color="{ThemeResource SystemColorWindowColor}" />
|
||||
<SolidColorBrush x:Key="InfoBarInformationalSeverityBackgroundBrush" Color="{ThemeResource SystemColorWindowColor}" />
|
||||
|
||||
<StaticResource x:Key="InfoBarErrorSeverityIconBackground" ResourceKey="SystemColorHighlightColor" />
|
||||
<StaticResource x:Key="InfoBarWarningSeverityIconBackground" ResourceKey="SystemColorHighlightColor" />
|
||||
<StaticResource x:Key="InfoBarSuccessSeverityIconBackground" ResourceKey="SystemColorHighlightColor" />
|
||||
<StaticResource x:Key="InfoBarInformationalSeverityIconBackground" ResourceKey="SystemColorHighlightColor" />
|
||||
|
||||
<StaticResource x:Key="InfoBarErrorSeverityIconForeground" ResourceKey="SystemColorHighlightTextColor" />
|
||||
<StaticResource x:Key="InfoBarWarningSeverityIconForeground" ResourceKey="SystemColorHighlightTextColor" />
|
||||
<StaticResource x:Key="InfoBarSuccessSeverityIconForeground" ResourceKey="SystemColorHighlightTextColor" />
|
||||
<StaticResource x:Key="InfoBarInformationalSeverityIconForeground" ResourceKey="SystemColorHighlightTextColor" />
|
||||
|
||||
<StaticResource x:Key="InfoBarTitleForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
|
||||
<StaticResource x:Key="InfoBarMessageForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
|
||||
<StaticResource x:Key="InfoBarHyperlinkButtonForeground" ResourceKey="SystemControlHyperlinkTextBrush" />
|
||||
|
||||
<StaticResource x:Key="InfoBarBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
|
||||
<Thickness x:Key="InfoBarBorderThickness">2</Thickness>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
|
||||
<x:Double x:Key="InfoBarTitleFontSize">14</x:Double>
|
||||
<FontWeight x:Key="InfoBarTitleFontWeight">SemiBold</FontWeight>
|
||||
|
||||
<x:Double x:Key="InfoBarMessageFontSize">14</x:Double>
|
||||
<FontWeight x:Key="InfoBarMessageFontWeight">Normal</FontWeight>
|
||||
|
||||
<x:Double x:Key="InfoBarMinHeight">48</x:Double>
|
||||
|
||||
<x:Double x:Key="InfoBarCloseButtonSize">38</x:Double>
|
||||
<x:Double x:Key="InfoBarCloseButtonGlyphSize">16</x:Double>
|
||||
|
||||
<!-- This negative margin makes the link visually line up with the title/message -->
|
||||
<Thickness x:Key="InfoBarHyperlinkButtonMargin">-12,0,0,0</Thickness>
|
||||
|
||||
<x:String x:Key="InfoBarIconBackgroundGlyph"></x:String>
|
||||
<x:String x:Key="InfoBarInformationalIconGlyph"></x:String>
|
||||
<x:String x:Key="InfoBarErrorIconGlyph"></x:String>
|
||||
<x:String x:Key="InfoBarWarningIconGlyph"></x:String>
|
||||
<x:String x:Key="InfoBarSuccessIconGlyph"></x:String>
|
||||
|
||||
<Thickness x:Key="InfoBarContentRootPadding">16,0,0,0</Thickness>
|
||||
|
||||
<Thickness x:Key="InfoBarIconMargin">0,16,14,16</Thickness>
|
||||
<x:Double x:Key="InfoBarIconFontSize">16</x:Double>
|
||||
|
||||
<Thickness x:Key="InfoBarPanelMargin">0,0,16,0</Thickness>
|
||||
<Thickness x:Key="InfoBarPanelHorizontalOrientationPadding">0,0,0,0</Thickness>
|
||||
<Thickness x:Key="InfoBarPanelVerticalOrientationPadding">0,14,0,18</Thickness>
|
||||
|
||||
<Thickness x:Key="InfoBarTitleHorizontalOrientationMargin">0,14,0,0</Thickness>
|
||||
<Thickness x:Key="InfoBarTitleVerticalOrientationMargin">0,14,0,0</Thickness>
|
||||
|
||||
<Thickness x:Key="InfoBarMessageHorizontalOrientationMargin">12,14,0,0</Thickness>
|
||||
<Thickness x:Key="InfoBarMessageVerticalOrientationMargin">0,4,0,0</Thickness>
|
||||
|
||||
<Thickness x:Key="InfoBarActionHorizontalOrientationMargin">16,8,0,0</Thickness>
|
||||
<Thickness x:Key="InfoBarActionVerticalOrientationMargin">0,12,0,0</Thickness>
|
||||
|
||||
<Symbol x:Key="InfoBarCloseButtonSymbol">Cancel</Symbol>
|
||||
|
||||
<Style
|
||||
x:Key="InfoBarCloseButtonStyle"
|
||||
BasedOn="{StaticResource DefaultButtonStyle}"
|
||||
TargetType="Button">
|
||||
<Style.Setters>
|
||||
<Setter Property="Width" Value="{StaticResource InfoBarCloseButtonSize}" />
|
||||
<Setter Property="Height" Value="{StaticResource InfoBarCloseButtonSize}" />
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style.Setters>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="controls:WinoInfoBar">
|
||||
<Setter Property="IsTabStop" Value="False" />
|
||||
<Setter Property="CloseButtonStyle" Value="{StaticResource InfoBarCloseButtonStyle}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="{ThemeResource InfoBarBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="{ThemeResource InfoBarBorderThickness}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="controls:WinoInfoBar">
|
||||
<Border
|
||||
x:Name="ContentRoot"
|
||||
VerticalAlignment="Top"
|
||||
contract7Present:CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Background="{ThemeResource InfoBarInformationalSeverityBackgroundBrush}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<!-- Background is used here so that it overrides the severity status color if set. -->
|
||||
<Grid
|
||||
MinHeight="{ThemeResource InfoBarMinHeight}"
|
||||
Padding="{StaticResource InfoBarContentRootPadding}"
|
||||
HorizontalAlignment="Stretch"
|
||||
contract7Present:CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Background="{TemplateBinding Background}">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<!-- Icon -->
|
||||
<ColumnDefinition Width="*" />
|
||||
<!-- Title, message, and action -->
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<!-- Close button -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid x:Name="StandardIconArea" Visibility="Collapsed">
|
||||
|
||||
<TextBlock
|
||||
x:Name="IconBackground"
|
||||
Grid.Column="0"
|
||||
Margin="{StaticResource InfoBarIconMargin}"
|
||||
VerticalAlignment="Top"
|
||||
AutomationProperties.AccessibilityView="Raw"
|
||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||
FontSize="{StaticResource InfoBarIconFontSize}"
|
||||
Foreground="{ThemeResource InfoBarInformationalSeverityIconBackground}"
|
||||
Text="{StaticResource InfoBarIconBackgroundGlyph}" />
|
||||
|
||||
<TextBlock
|
||||
x:Name="StandardIcon"
|
||||
Grid.Column="0"
|
||||
Margin="{StaticResource InfoBarIconMargin}"
|
||||
VerticalAlignment="Top"
|
||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||
FontSize="{StaticResource InfoBarIconFontSize}"
|
||||
Foreground="{ThemeResource InfoBarInformationalSeverityIconForeground}"
|
||||
Text="{StaticResource InfoBarInformationalIconGlyph}" />
|
||||
</Grid>
|
||||
|
||||
<Viewbox
|
||||
x:Name="UserIconBox"
|
||||
Grid.Column="0"
|
||||
MaxWidth="{ThemeResource InfoBarIconFontSize}"
|
||||
MaxHeight="{ThemeResource InfoBarIconFontSize}"
|
||||
Margin="{ThemeResource InfoBarIconMargin}"
|
||||
VerticalAlignment="Top"
|
||||
Child="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.IconElement}"
|
||||
Visibility="Collapsed" />
|
||||
|
||||
<primitives:InfoBarPanel
|
||||
Grid.Column="1"
|
||||
Margin="{StaticResource InfoBarPanelMargin}"
|
||||
HorizontalOrientationPadding="{StaticResource InfoBarPanelHorizontalOrientationPadding}"
|
||||
VerticalOrientationPadding="{StaticResource InfoBarPanelVerticalOrientationPadding}">
|
||||
|
||||
<TextBlock
|
||||
x:Name="Title"
|
||||
primitives:InfoBarPanel.HorizontalOrientationMargin="{StaticResource InfoBarTitleHorizontalOrientationMargin}"
|
||||
primitives:InfoBarPanel.VerticalOrientationMargin="{StaticResource InfoBarTitleVerticalOrientationMargin}"
|
||||
AutomationProperties.LandmarkType="Navigation"
|
||||
FontSize="{StaticResource InfoBarTitleFontSize}"
|
||||
FontWeight="{StaticResource InfoBarTitleFontWeight}"
|
||||
Foreground="{ThemeResource InfoBarTitleForeground}"
|
||||
Text="{TemplateBinding Title}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
|
||||
<TextBlock
|
||||
x:Name="Message"
|
||||
primitives:InfoBarPanel.HorizontalOrientationMargin="{StaticResource InfoBarMessageHorizontalOrientationMargin}"
|
||||
primitives:InfoBarPanel.VerticalOrientationMargin="{StaticResource InfoBarMessageVerticalOrientationMargin}"
|
||||
FontSize="{StaticResource InfoBarMessageFontSize}"
|
||||
FontWeight="{StaticResource InfoBarMessageFontWeight}"
|
||||
Foreground="{ThemeResource InfoBarMessageForeground}"
|
||||
Text="{TemplateBinding Message}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
|
||||
<ContentPresenter
|
||||
VerticalAlignment="Top"
|
||||
primitives:InfoBarPanel.HorizontalOrientationMargin="{StaticResource InfoBarActionHorizontalOrientationMargin}"
|
||||
primitives:InfoBarPanel.VerticalOrientationMargin="{StaticResource InfoBarActionVerticalOrientationMargin}"
|
||||
Content="{TemplateBinding ActionButton}">
|
||||
|
||||
<ContentPresenter.Resources>
|
||||
<Style BasedOn="{StaticResource DefaultHyperlinkButtonStyle}" TargetType="HyperlinkButton">
|
||||
<Style.Setters>
|
||||
<Setter Property="Margin" Value="{StaticResource InfoBarHyperlinkButtonMargin}" />
|
||||
<Setter Property="Foreground" Value="{ThemeResource InfoBarHyperlinkButtonForeground}" />
|
||||
</Style.Setters>
|
||||
</Style>
|
||||
</ContentPresenter.Resources>
|
||||
</ContentPresenter>
|
||||
|
||||
</primitives:InfoBarPanel>
|
||||
|
||||
<ContentPresenter
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
|
||||
<Button
|
||||
Name="CloseButton"
|
||||
Grid.Column="2"
|
||||
Command="{TemplateBinding CloseButtonCommand}"
|
||||
CommandParameter="{TemplateBinding CloseButtonCommandParameter}"
|
||||
Style="{TemplateBinding CloseButtonStyle}">
|
||||
|
||||
<Button.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary x:Key="Default">
|
||||
<StaticResource x:Key="ButtonBackground" ResourceKey="AppBarButtonBackground" />
|
||||
<StaticResource x:Key="ButtonBackgroundPointerOver" ResourceKey="AppBarButtonBackgroundPointerOver" />
|
||||
<StaticResource x:Key="ButtonBackgroundPressed" ResourceKey="AppBarButtonBackgroundPressed" />
|
||||
<StaticResource x:Key="ButtonBackgroundDisabled" ResourceKey="AppBarButtonBackgroundDisabled" />
|
||||
<StaticResource x:Key="ButtonForeground" ResourceKey="AppBarButtonForeground" />
|
||||
<StaticResource x:Key="ButtonForegroundPointerOver" ResourceKey="AppBarButtonForegroundPointerOver" />
|
||||
<StaticResource x:Key="ButtonForegroundPressed" ResourceKey="AppBarButtonForegroundPressed" />
|
||||
<StaticResource x:Key="ButtonForegroundDisabled" ResourceKey="AppBarButtonForegroundDisabled" />
|
||||
<StaticResource x:Key="ButtonBorderBrush" ResourceKey="AppBarButtonBorderBrush" />
|
||||
<StaticResource x:Key="ButtonBorderBrushPointerOver" ResourceKey="AppBarButtonBorderBrushPointerOver" />
|
||||
<StaticResource x:Key="ButtonBorderBrushPressed" ResourceKey="AppBarButtonBorderBrushPressed" />
|
||||
<StaticResource x:Key="ButtonBorderBrushDisabled" ResourceKey="AppBarButtonBorderBrushDisabled" />
|
||||
</ResourceDictionary>
|
||||
|
||||
<ResourceDictionary x:Key="HighContrast">
|
||||
<StaticResource x:Key="ButtonBackground" ResourceKey="AppBarButtonBackground" />
|
||||
<StaticResource x:Key="ButtonBackgroundPointerOver" ResourceKey="AppBarButtonBackgroundPointerOver" />
|
||||
<StaticResource x:Key="ButtonBackgroundPressed" ResourceKey="AppBarButtonBackgroundPressed" />
|
||||
<StaticResource x:Key="ButtonBackgroundDisabled" ResourceKey="AppBarButtonBackgroundDisabled" />
|
||||
<StaticResource x:Key="ButtonForeground" ResourceKey="AppBarButtonForeground" />
|
||||
<StaticResource x:Key="ButtonForegroundPointerOver" ResourceKey="AppBarButtonForegroundPointerOver" />
|
||||
<StaticResource x:Key="ButtonForegroundPressed" ResourceKey="AppBarButtonForegroundPressed" />
|
||||
<StaticResource x:Key="ButtonForegroundDisabled" ResourceKey="AppBarButtonForegroundDisabled" />
|
||||
<StaticResource x:Key="ButtonBorderBrush" ResourceKey="AppBarButtonBorderBrush" />
|
||||
<StaticResource x:Key="ButtonBorderBrushPointerOver" ResourceKey="AppBarButtonBorderBrushPointerOver" />
|
||||
<StaticResource x:Key="ButtonBorderBrushPressed" ResourceKey="AppBarButtonBorderBrushPressed" />
|
||||
<StaticResource x:Key="ButtonBorderBrushDisabled" ResourceKey="AppBarButtonBorderBrushDisabled" />
|
||||
</ResourceDictionary>
|
||||
|
||||
<ResourceDictionary x:Key="Light">
|
||||
<StaticResource x:Key="ButtonBackground" ResourceKey="AppBarButtonBackground" />
|
||||
<StaticResource x:Key="ButtonBackgroundPointerOver" ResourceKey="AppBarButtonBackgroundPointerOver" />
|
||||
<StaticResource x:Key="ButtonBackgroundPressed" ResourceKey="AppBarButtonBackgroundPressed" />
|
||||
<StaticResource x:Key="ButtonBackgroundDisabled" ResourceKey="AppBarButtonBackgroundDisabled" />
|
||||
<StaticResource x:Key="ButtonForeground" ResourceKey="AppBarButtonForeground" />
|
||||
<StaticResource x:Key="ButtonForegroundPointerOver" ResourceKey="AppBarButtonForegroundPointerOver" />
|
||||
<StaticResource x:Key="ButtonForegroundPressed" ResourceKey="AppBarButtonForegroundPressed" />
|
||||
<StaticResource x:Key="ButtonForegroundDisabled" ResourceKey="AppBarButtonForegroundDisabled" />
|
||||
<StaticResource x:Key="ButtonBorderBrush" ResourceKey="AppBarButtonBorderBrush" />
|
||||
<StaticResource x:Key="ButtonBorderBrushPointerOver" ResourceKey="AppBarButtonBorderBrushPointerOver" />
|
||||
<StaticResource x:Key="ButtonBorderBrushPressed" ResourceKey="AppBarButtonBorderBrushPressed" />
|
||||
<StaticResource x:Key="ButtonBorderBrushDisabled" ResourceKey="AppBarButtonBorderBrushDisabled" />
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Button.Resources>
|
||||
|
||||
<Viewbox
|
||||
Width="{StaticResource InfoBarCloseButtonGlyphSize}"
|
||||
Height="{StaticResource InfoBarCloseButtonGlyphSize}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<SymbolIcon Symbol="{StaticResource InfoBarCloseButtonSymbol}" />
|
||||
</Viewbox>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
|
||||
<VisualStateGroup x:Name="SeverityLevels">
|
||||
<VisualState x:Name="Informational">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="ContentRoot.Background" Value="{ThemeResource InfoBarInformationalSeverityBackgroundBrush}" />
|
||||
<Setter Target="IconBackground.Foreground" Value="{ThemeResource InfoBarInformationalSeverityIconBackground}" />
|
||||
<Setter Target="StandardIcon.Text" Value="{StaticResource InfoBarInformationalIconGlyph}" />
|
||||
<Setter Target="StandardIcon.Foreground" Value="{ThemeResource InfoBarInformationalSeverityIconForeground}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
|
||||
<VisualState x:Name="Error">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="ContentRoot.Background" Value="{ThemeResource InfoBarErrorSeverityBackgroundBrush}" />
|
||||
<Setter Target="IconBackground.Foreground" Value="{ThemeResource InfoBarErrorSeverityIconBackground}" />
|
||||
<Setter Target="StandardIcon.Text" Value="{StaticResource InfoBarErrorIconGlyph}" />
|
||||
<Setter Target="StandardIcon.Foreground" Value="{ThemeResource InfoBarErrorSeverityIconForeground}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
|
||||
<VisualState x:Name="Warning">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="ContentRoot.Background" Value="{ThemeResource InfoBarWarningSeverityBackgroundBrush}" />
|
||||
<Setter Target="IconBackground.Foreground" Value="{ThemeResource InfoBarWarningSeverityIconBackground}" />
|
||||
<Setter Target="StandardIcon.Text" Value="{StaticResource InfoBarWarningIconGlyph}" />
|
||||
<Setter Target="StandardIcon.Foreground" Value="{ThemeResource InfoBarWarningSeverityIconForeground}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
|
||||
<VisualState x:Name="Success">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="ContentRoot.Background" Value="{ThemeResource InfoBarSuccessSeverityBackgroundBrush}" />
|
||||
<Setter Target="IconBackground.Foreground" Value="{ThemeResource InfoBarSuccessSeverityIconBackground}" />
|
||||
<Setter Target="StandardIcon.Text" Value="{StaticResource InfoBarSuccessIconGlyph}" />
|
||||
<Setter Target="StandardIcon.Foreground" Value="{ThemeResource InfoBarSuccessSeverityIconForeground}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
|
||||
<VisualStateGroup x:Name="IconStates">
|
||||
<VisualState x:Name="StandardIconVisible">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="UserIconBox.Visibility" Value="Collapsed" />
|
||||
<Setter Target="StandardIconArea.Visibility" Value="Visible" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
|
||||
<VisualState x:Name="UserIconVisible">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="UserIconBox.Visibility" Value="Visible" />
|
||||
<Setter Target="StandardIconArea.Visibility" Value="Collapsed" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
|
||||
<VisualState x:Name="NoIconVisible" />
|
||||
</VisualStateGroup>
|
||||
|
||||
<VisualStateGroup>
|
||||
<VisualState x:Name="CloseButtonVisible" />
|
||||
<VisualState x:Name="CloseButtonCollapsed">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="CloseButton.Visibility" Value="Collapsed" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
|
||||
<VisualStateGroup x:Name="InfoBarVisibility">
|
||||
<VisualState x:Name="InfoBarVisible" />
|
||||
<VisualState x:Name="InfoBarCollapsed">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="ContentRoot.Visibility" Value="Collapsed" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
|
||||
<VisualStateGroup>
|
||||
<VisualState x:Name="ForegroundNotSet" />
|
||||
<VisualState x:Name="ForegroundSet">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Title.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Foreground}" />
|
||||
<Setter Target="Message.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Foreground}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user