зеркало из https://github.com/DeGsoft/maui-linux.git
940 строки
70 KiB
XML
940 строки
70 KiB
XML
<ResourceDictionary
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="using:Xamarin.Forms.Platform.WinRT">
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="Resources.xaml" />
|
|
<ResourceDictionary Source="FormsTextBoxStyle.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
<SolidColorBrush x:Key="TabButtonPointerOverBackgroundBrush" Color="#44888888" />
|
|
<SolidColorBrush x:Key="TabButtonBackgroundBrush" Color="#29888888" />
|
|
|
|
<Style x:Key="FormsListViewItem" TargetType="ListViewItem">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="Margin" Value="0" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListViewItem">
|
|
<local:FormsListViewItemPresenter
|
|
CheckBrush="{ThemeResource ListViewItemCheckThemeBrush}"
|
|
CheckHintBrush="{ThemeResource ListViewItemCheckHintThemeBrush}"
|
|
CheckSelectingBrush="{ThemeResource ListViewItemCheckSelectingThemeBrush}"
|
|
ContentMargin="0"
|
|
DisabledOpacity="{ThemeResource ListViewItemDisabledThemeOpacity}"
|
|
DragBackground="{ThemeResource ListViewItemDragBackgroundThemeBrush}"
|
|
DragForeground="{ThemeResource ListViewItemDragForegroundThemeBrush}"
|
|
DragOpacity="{ThemeResource ListViewItemDragThemeOpacity}"
|
|
FocusBorderBrush="{ThemeResource ListViewItemFocusBorderThemeBrush}"
|
|
PlaceholderBackground="{ThemeResource ListViewItemPlaceholderBackgroundThemeBrush}"
|
|
PointerOverBackground="{ThemeResource ListViewItemPointerOverBackgroundThemeBrush}"
|
|
PointerOverBackgroundMargin="0"
|
|
ReorderHintOffset="{ThemeResource ListViewItemReorderHintThemeOffset}"
|
|
SelectedBackground="{ThemeResource ListViewItemSelectedBackgroundThemeBrush}"
|
|
SelectedBorderThickness="{ThemeResource ListViewItemCompactSelectedBorderThemeThickness}"
|
|
SelectedForeground="{ThemeResource ListViewItemSelectedForegroundThemeBrush}"
|
|
SelectedPointerOverBackground="{ThemeResource ListViewItemSelectedPointerOverBackgroundThemeBrush}"
|
|
SelectedPointerOverBorderBrush="{ThemeResource ListViewItemSelectedPointerOverBorderThemeBrush}"
|
|
SelectionCheckMarkVisualEnabled="False" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<DataTemplate x:Key="TextCell">
|
|
<StackPanel Margin="5,4,4,9.5">
|
|
<TextBlock
|
|
Text="{Binding Text}"
|
|
Style="{ThemeResource TitleTextBlockStyle}"
|
|
Visibility="{Binding Text,RelativeSource={RelativeSource Self}, Converter={StaticResource CollapseWhenEmpty}}"
|
|
Foreground="{Binding TextColor, Converter={StaticResource ColorConverter}, ConverterParameter=DefaultTextForegroundThemeBrush}" />
|
|
|
|
<TextBlock
|
|
Text="{Binding Detail}"
|
|
Style="{ThemeResource BodyTextBlockStyle}"
|
|
Visibility="{Binding Text,RelativeSource={RelativeSource Self}, Converter={StaticResource CollapseWhenEmpty}}"
|
|
Foreground="{Binding DetailColor, Converter={StaticResource ColorConverter}, ConverterParameter=DefaultTextForegroundThemeBrush}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate x:Key="ListViewHeaderTextCell">
|
|
<StackPanel Margin="5,4,4,9.5">
|
|
<TextBlock
|
|
Text="{Binding Text}"
|
|
Style="{ThemeResource SubheaderTextBlockStyle}"
|
|
Visibility="{Binding Text,RelativeSource={RelativeSource Self}, Converter={StaticResource CollapseWhenEmpty}}"
|
|
Foreground="{Binding TextColor, Converter={StaticResource ColorConverter}, ConverterParameter=DefaultTextForegroundThemeBrush}" />
|
|
|
|
<TextBlock
|
|
Text="{Binding Detail}"
|
|
Style="{ThemeResource BodyTextBlockStyle}"
|
|
Visibility="{Binding Text,RelativeSource={RelativeSource Self}, Converter={StaticResource CollapseWhenEmpty}}"
|
|
Foreground="{Binding DetailColor, Converter={StaticResource ColorConverter}, ConverterParameter=DefaultTextForegroundThemeBrush}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate x:Key="ImageCell">
|
|
<Grid Margin="5,4,4,9.5">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Image Grid.Column="0" Grid.RowSpan="2"
|
|
DataContext="{Binding ImageSource, Converter={StaticResource ImageConverter}}"
|
|
Source="{Binding Value}"
|
|
VerticalAlignment="Center" />
|
|
|
|
<TextBlock Grid.Column="1" Grid.Row="0"
|
|
Text="{Binding Text}"
|
|
Style="{ThemeResource TitleTextBlockStyle}"
|
|
Visibility="{Binding Text,RelativeSource={RelativeSource Self}, Converter={StaticResource CollapseWhenEmpty}}"
|
|
Foreground="{Binding TextColor, Converter={StaticResource ColorConverter}, ConverterParameter=DefaultTextForegroundThemeBrush}" />
|
|
|
|
<TextBlock Grid.Column="1" Grid.Row="1"
|
|
Text="{Binding Detail}"
|
|
Style="{ThemeResource BodyTextBlockStyle}"
|
|
Visibility="{Binding Text,RelativeSource={RelativeSource Self}, Converter={StaticResource CollapseWhenEmpty}}"
|
|
Foreground="{Binding DetailColor, Converter={StaticResource ColorConverter}, ConverterParameter=DefaultTextForegroundThemeBrush}" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate x:Key="SwitchCell">
|
|
<Grid Margin="5,4,4,9.5" HorizontalAlignment="Stretch">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Grid.Column="0" Text="{Binding Text}" VerticalAlignment="Center" Style="{ThemeResource TitleTextBlockStyle}" />
|
|
|
|
<ToggleSwitch Grid.Column="1" IsOn="{Binding On, Mode=TwoWay}" OnContent="" OffContent="" VerticalAlignment="Center" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate x:Key="EntryCell">
|
|
<local:EntryCellTextBox Margin="5,4,4,9.5" IsEnabled="{Binding IsEnabled}" Header="{Binding}" Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" PlaceholderText="{Binding Placeholder}" TextAlignment="{Binding HorizontalTextAlignment,Converter={StaticResource HorizontalTextAlignmentConverter}}" InputScope="{Binding Keyboard,Converter={StaticResource KeyboardConverter}}" HorizontalAlignment="Stretch">
|
|
<local:EntryCellTextBox.HeaderTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Label}" Style="{ThemeResource TitleTextBlockStyle}" Foreground="{Binding LabelColor, Converter={StaticResource ColorConverter}, ConverterParameter=DefaultTextForegroundThemeBrush}" />
|
|
</DataTemplate>
|
|
</local:EntryCellTextBox.HeaderTemplate>
|
|
</local:EntryCellTextBox>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate x:Key="ViewCell">
|
|
<ContentControl DataContext="{Binding Cell}">
|
|
<ContentPresenter Height="{Binding RenderHeight, Converter={StaticResource HeightConverter}}" Content="{Binding View, Converter={StaticResource ViewToRenderer}}" />
|
|
</ContentControl>
|
|
</DataTemplate>
|
|
|
|
<Style x:Key="JumpListGrid" TargetType="GridView">
|
|
<Setter Property="ItemTemplate">
|
|
<Setter.Value>
|
|
<DataTemplate>
|
|
<Border Background="{ThemeResource SystemColorControlAccentBrush}" Padding="5" Margin="3" MinHeight="80" MinWidth="80">
|
|
<TextBlock Text="{Binding}" Style="{ThemeResource SubheaderTextBlockStyle}" VerticalAlignment="Bottom" />
|
|
</Border>
|
|
</DataTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<GroupStyle x:Key="ListViewGroup" HidesIfEmpty="False">
|
|
<GroupStyle.HeaderContainerStyle>
|
|
<Style TargetType="ListViewHeaderItem">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<local:ListGroupHeaderPresenter />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</GroupStyle.HeaderContainerStyle>
|
|
<GroupStyle.HeaderTemplate>
|
|
<DataTemplate>
|
|
<local:CellControl IsGroupHeader="true" HorizontalContentAlignment="Stretch" />
|
|
</DataTemplate>
|
|
</GroupStyle.HeaderTemplate>
|
|
</GroupStyle>
|
|
|
|
<Style TargetType="local:TabButton">
|
|
<Setter Property="MinWidth" Value="166" />
|
|
<Setter Property="Margin" Value="0,0,15,0" />
|
|
<Setter Property="Padding" Value="9.5" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalContentAlignment" Value="Bottom" />
|
|
<Setter Property="Background" Value="{ThemeResource TabButtonBackgroundBrush}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Border x:Name="Border" Background="{TemplateBinding Background}" BorderThickness="0" Margin="{TemplateBinding Margin}">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal" />
|
|
<VisualState x:Name="Pressed">
|
|
<Storyboard>
|
|
<PointerDownThemeAnimation TargetName="Border" />
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabButtonPointerOverBackgroundBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonPointerOverForegroundThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="PointerOver">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabButtonPointerOverBackgroundBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonPointerOverForegroundThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualStateGroup.Transitions>
|
|
<VisualTransition From="Pressed" To="Normal">
|
|
<Storyboard>
|
|
<PointerUpThemeAnimation TargetName="Border" />
|
|
</Storyboard>
|
|
</VisualTransition>
|
|
<VisualTransition From="Pressed" To="PointerOver">
|
|
<Storyboard>
|
|
<PointerUpThemeAnimation TargetName="Border" />
|
|
</Storyboard>
|
|
</VisualTransition>
|
|
</VisualStateGroup.Transitions>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<ContentPresenter x:Name="ContentPresenter" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="local:TabsControl">
|
|
<Setter Property="Background" Value="{ThemeResource AppBarBackgroundThemeBrush}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Border Background="{TemplateBinding Background}" BorderThickness="0">
|
|
<Grid Margin="19,13,19,13">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="0" Margin="9.5,0,0,9.5" Text="{Binding Title, Converter={StaticResource UpperConverter}}"
|
|
Opacity=".6" FontWeight="SemiBold" Foreground="{ThemeResource AppBarItemForegroundThemeBrush}"
|
|
Style="{ThemeResource BaseTextBlockStyle}" />
|
|
|
|
<ScrollViewer Grid.Row="1" VerticalScrollMode="Disabled" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Auto">
|
|
<ItemsPresenter />
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="ItemsPanel">
|
|
<Setter.Value>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Horizontal" Margin="0,11,0,0" Background="{Binding BarBackgroundColor, Converter={StaticResource ColorConverter}, ConverterParameter=TabButtonBackgroundBrush}" Name="TabbedPageHeaderStackPanel" />
|
|
</ItemsPanelTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="ItemTemplate">
|
|
<Setter.Value>
|
|
<DataTemplate>
|
|
<local:TabButton>
|
|
<StackPanel VerticalAlignment="Bottom">
|
|
<Image DataContext="{Binding Icon, Converter={StaticResource ImageConverter}}" Source="{Binding Value}" HorizontalAlignment="Left" />
|
|
<TextBlock Margin="0,15,0,15" Text="{Binding Title, Converter={StaticResource UpperConverter}}"
|
|
Style="{ThemeResource CaptionTextBlockStyle}" FontWeight="SemiBold" Name="TabbedPageHeaderTextBlock" HorizontalAlignment="Left" />
|
|
</StackPanel>
|
|
</local:TabButton>
|
|
</DataTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<ControlTemplate x:Key="MasterDetailSplit">
|
|
<Grid Background="{TemplateBinding Background}">
|
|
<Grid.Resources>
|
|
<Style TargetType="local:PageControl" BasedOn="{StaticResource PageControlDefaultStyle}">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="InvisibleBackButtonCollapsed" Value="True" />
|
|
</Style>
|
|
</Grid.Resources>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Border Grid.Column="0" Margin="0" Padding="0" Background="{Binding Converter={StaticResource MasterBackgroundConverter}, RelativeSource={RelativeSource Mode=TemplatedParent}}">
|
|
<ContentPresenter x:Name="masterPresenter" />
|
|
</Border>
|
|
|
|
<ContentPresenter x:Name="detailPresenter" Grid.Column="1" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
|
|
<ControlTemplate x:Key="MasterDetailPopup">
|
|
<Grid Background="{TemplateBinding Background}">
|
|
<Grid.Resources>
|
|
<Style TargetType="local:PageControl" BasedOn="{StaticResource PageControlDefaultStyle}">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
</Style>
|
|
</Grid.Resources>
|
|
|
|
<Popup x:Name="popup" IsLightDismissEnabled="true">
|
|
<Popup.ChildTransitions>
|
|
<TransitionCollection>
|
|
<PaneThemeTransition Edge="Left" />
|
|
</TransitionCollection>
|
|
</Popup.ChildTransitions>
|
|
|
|
<Border Margin="0" Padding="0" BorderThickness="0" Background="{Binding Converter={StaticResource MasterBackgroundConverter}, RelativeSource={RelativeSource Mode=TemplatedParent}}">
|
|
<ContentPresenter x:Name="masterPresenter" />
|
|
</Border>
|
|
</Popup>
|
|
|
|
<ContentPresenter x:Name="detailPresenter" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
|
|
<Style x:Key="PageControlDefaultStyle" TargetType="local:PageControl">
|
|
<Setter Property="ContentMargin" Value="0" />
|
|
<Setter Property="TitleBrush" Value="{ThemeResource DefaultTextForegroundThemeBrush}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="local:PageControl">
|
|
<Grid Background="{TemplateBinding Background}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Grid.Row="0" Grid.Column="0" Height="79" VerticalAlignment="Center" Background="{TemplateBinding ToolbarBackground}" Visibility="{TemplateBinding TitleVisibility}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" MinWidth="{Binding TitleInset,RelativeSource={RelativeSource TemplatedParent}}" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<AppBarButton x:Name="backButton" Grid.Column="0" Margin="0,6,0,0" Foreground="{TemplateBinding TitleBrush}" ToolTipService.ToolTip="{TemplateBinding BackButtonTitle}" HorizontalAlignment="Right" VerticalAlignment="Center" Visibility="Collapsed">
|
|
<AppBarButton.Icon>
|
|
<SymbolIcon Symbol="Back" />
|
|
</AppBarButton.Icon>
|
|
</AppBarButton>
|
|
|
|
<TextBlock Name="title" Padding="10,0,0,0" Grid.Column="1" Foreground="{TemplateBinding TitleBrush}" VerticalAlignment="Center" Style="{ThemeResource HeaderTextBlockStyle}" Text="{Binding Title}" />
|
|
</Grid>
|
|
|
|
<ContentPresenter Margin="{TemplateBinding ContentMargin}" ContentTransitions="{TemplateBinding ContentTransitions}" x:Name="presenter" Grid.Row="1" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="local:PageControl" BasedOn="{StaticResource PageControlDefaultStyle}" />
|
|
|
|
<Style TargetType="local:FormsSearchBox">
|
|
<Setter Property="Background" Value="{ThemeResource SearchBoxBackgroundThemeBrush}"/>
|
|
<Setter Property="BorderBrush" Value="{ThemeResource SearchBoxBorderThemeBrush}"/>
|
|
<Setter Property="BorderThickness" Value="{ThemeResource SearchBoxBorderThemeThickness}"/>
|
|
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
|
|
<Setter Property="FontSize" Value="{ThemeResource SearchBoxContentThemeFontSize}"/>
|
|
<Setter Property="FontWeight" Value="{ThemeResource SearchBoxContentThemeFontWeight}"/>
|
|
<Setter Property="Foreground" Value="{ThemeResource SearchBoxForegroundThemeBrush}"/>
|
|
<Setter Property="Padding" Value="{ThemeResource SearchBoxThemePadding}"/>
|
|
<Setter Property="IsTabStop" Value="False"/>
|
|
<Setter Property="Typography.StylisticSet20" Value="True"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="local:FormsSearchBox">
|
|
<Grid x:Name="SearchBoxGrid">
|
|
<Grid.Resources>
|
|
<Style x:Key="SearchButtonStyle" TargetType="Button">
|
|
<Setter Property="IsTabStop" Value="False"/>
|
|
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Grid Background="Transparent">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal"/>
|
|
<VisualState x:Name="PointerOver">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="SearchGlyph">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxButtonPointerOverForegroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="SearchButtonBackground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxButtonPointerOverBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="SearchGlyph">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxFocusedTextThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="SearchButtonBackground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxFocusedBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled"/>
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="FocusStates">
|
|
<VisualState x:Name="Focused"/>
|
|
<VisualState x:Name="Unfocused"/>
|
|
<VisualState x:Name="PointerFocused"/>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
<Grid x:Name="SearchButtonBackground" Background="{TemplateBinding Background}">
|
|
<TextBlock x:Name="SearchGlyph" AutomationProperties.AccessibilityView="Raw" Foreground="{TemplateBinding Foreground}" FontStyle="Normal" FontFamily="{ThemeResource SymbolThemeFontFamily}" HorizontalAlignment="Center" Text="" VerticalAlignment="Center"/>
|
|
</Grid>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="SearchTextBoxStyle" TargetType="local:FormsTextBox">
|
|
<Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}"/>
|
|
<Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}"/>
|
|
<Setter Property="Foreground" Value="{ThemeResource TextBoxForegroundThemeBrush}"/>
|
|
<Setter Property="PlaceholderForegroundBrush" Value="{ThemeResource TextBoxPlaceholderTextThemeBrush}"/>
|
|
<Setter Property="Background" Value="{ThemeResource TextBoxBackgroundThemeBrush}"/>
|
|
<Setter Property="BorderBrush" Value="{ThemeResource TextBoxBorderThemeBrush}"/>
|
|
<Setter Property="SelectionHighlightColor" Value="{ThemeResource TextSelectionHighlightColorThemeBrush}"/>
|
|
<Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}"/>
|
|
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
|
|
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/>
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden"/>
|
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden"/>
|
|
<Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False"/>
|
|
<Setter Property="Padding" Value="{ThemeResource TextControlThemePadding}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="local:FormsTextBox">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Disabled">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="BackgroundElement">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="BorderElement">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledBorderThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentElement">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledForegroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="PlaceholderTextContentPresenter">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledForegroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Normal">
|
|
<Storyboard>
|
|
<DoubleAnimation Duration="0" To="{ThemeResource TextControlBackgroundThemeOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundElement"/>
|
|
<DoubleAnimation Duration="0" To="{ThemeResource TextControlBorderThemeOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BorderElement"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="PointerOver">
|
|
<Storyboard>
|
|
<DoubleAnimation Duration="0" To="{ThemeResource TextControlPointerOverBackgroundThemeOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundElement"/>
|
|
<DoubleAnimation Duration="0" To="{ThemeResource TextControlPointerOverBorderThemeOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BorderElement"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Focused"/>
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="ButtonStates"/>
|
|
</VisualStateManager.VisualStateGroups>
|
|
<Border x:Name="BackgroundElement" Background="{TemplateBinding Background}" Margin="{TemplateBinding BorderThickness}" Grid.Row="1" Grid.RowSpan="1"/>
|
|
<Border x:Name="BorderElement" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.Row="1" Grid.RowSpan="1"/>
|
|
<ContentPresenter x:Name="HeaderContentPresenter" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" Foreground="{ThemeResource TextBoxForegroundHeaderThemeBrush}" FontWeight="Semilight" Margin="0,4,0,4" Grid.Row="0"/>
|
|
<ScrollViewer x:Name="ContentElement" AutomationProperties.AccessibilityView="Raw" HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" IsTabStop="False" IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" Margin="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" Grid.Row="1" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" ZoomMode="Disabled"/>
|
|
<ContentControl x:Name="PlaceholderTextContentPresenter" Grid.ColumnSpan="2" Content="{TemplateBinding PlaceholderText}" Foreground="{TemplateBinding PlaceholderForegroundBrush}" IsHitTestVisible="False" IsTabStop="False" Margin="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" Grid.Row="1"
|
|
HorizontalAlignment="{Binding TextAlignment,
|
|
RelativeSource={RelativeSource Mode=TemplatedParent},
|
|
Converter={StaticResource AlignmentConverter}}"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Grid.Resources>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="SearchBoxGrid">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Background, RelativeSource={RelativeSource Mode=TemplatedParent}}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="SearchBoxBorder">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding BorderBrush, RelativeSource={RelativeSource Mode=TemplatedParent}}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="SearchButton">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Foreground, RelativeSource={RelativeSource Mode=TemplatedParent}}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="PointerOver">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="SearchBoxGrid">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxPointerOverBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="SearchBoxBorder">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxPointerOverBorderThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="SearchButton">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxPointerOverTextThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="SearchBoxGrid">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxDisabledBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="SearchBoxBorder">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxDisabledBorderThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="SearchButton">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxDisabledTextThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="SearchTextBox">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Focused">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="SearchBoxGrid">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxFocusedBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="SearchBoxBorder">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxFocusedBorderThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="SearchButton">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxButtonForegroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="SearchButton">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxButtonBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="SearchSuggestionsPopupBorder">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxFocusedBorderThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="FocusedDropDown">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="SearchBoxGrid">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxFocusedBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="SearchBoxBorder">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxFocusedBorderThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="SearchButton">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxFocusedTextThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="SearchSuggestionsPopupBorder">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxFocusedBorderThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
<Border x:Name="SearchBoxBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<local:FormsTextBox TextAlignment="{TemplateBinding HorizontalTextAlignment}" x:Name="SearchTextBox" BorderThickness="0" Background="Transparent" Foreground="{TemplateBinding Foreground}" FontWeight="{TemplateBinding FontWeight}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" InputScope="Search" MinHeight="{ThemeResource SearchBoxTextBoxThemeMinHeight}" MaxLength="2048" Padding="{TemplateBinding Padding}" PlaceholderText="{TemplateBinding PlaceholderText}" Style="{StaticResource SearchTextBoxStyle}" TextWrapping="NoWrap" VerticalAlignment="Stretch"/>
|
|
<Button x:Name="SearchButton" AutomationProperties.AccessibilityView="Raw" Background="Transparent" Grid.Column="1" FontWeight="{ThemeResource SearchBoxButtonThemeFontWeight}" Style="{StaticResource SearchButtonStyle}"/>
|
|
</Grid>
|
|
</Border>
|
|
<Popup x:Name="SearchSuggestionsPopup" HorizontalAlignment="Left" VerticalAlignment="Bottom">
|
|
<Border x:Name="SearchSuggestionsPopupBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" MinWidth="{ThemeResource SearchBoxSuggestionPopupThemeMinWidth}">
|
|
<Border.Resources>
|
|
<Style x:Key="SearchSuggestionListViewItemStyle" TargetType="ListViewItem">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="TabNavigation" Value="Local"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
<Setter Property="Margin" Value="0"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListViewItem">
|
|
<Border x:Name="OuterContainer">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal"/>
|
|
<VisualState x:Name="PointerOver">
|
|
<Storyboard>
|
|
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PointerOverBorder"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<Storyboard>
|
|
<PointerDownThemeAnimation TargetName="ContentContainer"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="PointerOverPressed">
|
|
<Storyboard>
|
|
<PointerDownThemeAnimation TargetName="ContentContainer"/>
|
|
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PointerOverBorder"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<Storyboard>
|
|
<DoubleAnimation Duration="0" To="{ThemeResource ListViewItemDisabledThemeOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ListViewItemContentPresenter"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="FocusStates">
|
|
<VisualState x:Name="Focused">
|
|
<Storyboard>
|
|
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisual"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Unfocused"/>
|
|
<VisualState x:Name="PointerFocused"/>
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="SelectionStates">
|
|
<VisualState x:Name="Unselecting"/>
|
|
<VisualState x:Name="Unselected"/>
|
|
<VisualState x:Name="UnselectedPointerOver">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ListViewItemContentPresenter">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxButtonForegroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="UnselectedSwiping"/>
|
|
<VisualState x:Name="Selecting"/>
|
|
<VisualState x:Name="Selected">
|
|
<Storyboard>
|
|
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectionBackground"/>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ListViewItemContentPresenter">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxButtonForegroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="SelectedSwiping"/>
|
|
<VisualState x:Name="SelectedUnfocused">
|
|
<Storyboard>
|
|
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectionBackground"/>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ListViewItemContentPresenter">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxButtonForegroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
<Grid x:Name="ContentContainer">
|
|
<Rectangle x:Name="PointerOverBorder" Fill="{ThemeResource SearchBoxButtonBackgroundThemeBrush}" IsHitTestVisible="False" Opacity="0"/>
|
|
<Rectangle x:Name="FocusVisual" IsHitTestVisible="False" Opacity="0" Stroke="{ThemeResource ListViewItemFocusBorderThemeBrush}" StrokeThickness="2"/>
|
|
<Rectangle x:Name="SelectionBackground" Fill="{ThemeResource SearchBoxButtonBackgroundThemeBrush}" Opacity="0"/>
|
|
<ContentPresenter x:Name="ListViewItemContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" FontWeight="{Binding FontWeight, ElementName=SearchTextBox}" FontSize="{Binding FontSize, ElementName=SearchTextBox}" FontFamily="{Binding FontFamily, ElementName=SearchTextBox}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
|
</Grid>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Border.Resources>
|
|
<Grid MaxHeight="{ThemeResource SearchBoxSuggestionPopupThemeMaxHeight}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<Border x:Name="IMECandidateListContainer"/>
|
|
<Border x:Name="IMECandidateListSeparator" BorderBrush="{ThemeResource SearchBoxIMECandidateListSeparatorThemeBrush}" BorderThickness="{ThemeResource SearchBoxIMECandidateListSeparatorThemeThickness}" Grid.Row="1" Visibility="Collapsed"/>
|
|
<ListView x:Name="SearchSuggestionsList" Background="{ThemeResource TextBoxBackgroundThemeBrush}" IsTabStop="False" IsItemClickEnabled="true" Grid.Row="2">
|
|
<ListView.Resources>
|
|
<DataTemplate x:Name="HitHighlightedTextBlock">
|
|
<RichTextBlock x:Name="TextBlock" AutomationProperties.AccessibilityView="Raw" SelectionHighlightColor="{ThemeResource SearchBoxHitHighlightForegroundThemeBrush}" TextWrapping="Wrap" TextTrimming="WordEllipsis">
|
|
<RichTextBlock.Resources>
|
|
<DataTemplate x:Name="SelectedHitHighlightedRun">
|
|
<Run Foreground="{ThemeResource SearchBoxHitHighlightSelectedForegroundThemeBrush}"/>
|
|
</DataTemplate>
|
|
</RichTextBlock.Resources>
|
|
</RichTextBlock>
|
|
</DataTemplate>
|
|
</ListView.Resources>
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid>
|
|
<ContentControl x:Name="QuerySuggestionTemplate" Typography.DiscretionaryLigatures="False" Margin="{ThemeResource SearchBoxQuerySuggestionThemeMargin}" Visibility="Collapsed" VerticalAlignment="Center"/>
|
|
<Grid x:Name="ResultSuggestionTemplate" Typography.DiscretionaryLigatures="False" Margin="{ThemeResource SearchBoxResultSuggestionThemeMargin}" Visibility="Collapsed">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<Image x:Name="ResultSuggestionImage" Height="{ThemeResource SearchBoxResultSuggestionImageThemeHeight}" Margin="{ThemeResource SearchBoxSuggestionSubcomponentThemeMargin}" Grid.RowSpan="2" Width="{ThemeResource SearchBoxResultSuggestionImageThemeWidth}"/>
|
|
<ContentControl x:Name="ResultSuggestionText" Grid.Column="1" VerticalAlignment="Center"/>
|
|
<ContentControl x:Name="ResultSuggestionDetailText" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center"/>
|
|
</Grid>
|
|
<Grid x:Name="SeparatorSuggestionTemplate" Typography.DiscretionaryLigatures="False" Margin="{ThemeResource SearchBoxSeparatorSuggestionThemeMargin}" Visibility="Collapsed">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock x:Name="SeparatorSuggestionText" Margin="{ThemeResource SearchBoxSuggestionSubcomponentThemeMargin}" TextTrimming="WordEllipsis" VerticalAlignment="Center"/>
|
|
<Border BorderBrush="{ThemeResource SearchBoxSeparatorSuggestionForegroundThemeBrush}" BorderThickness="0,1,0,0" Grid.Column="1" VerticalAlignment="Center"/>
|
|
</Grid>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
<ListView.ItemContainerTransitions>
|
|
<TransitionCollection/>
|
|
</ListView.ItemContainerTransitions>
|
|
<ListView.ItemContainerStyle>
|
|
<StaticResource ResourceKey="SearchSuggestionListViewItemStyle"/>
|
|
</ListView.ItemContainerStyle>
|
|
</ListView>
|
|
</Grid>
|
|
</Border>
|
|
</Popup>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="ToggleSwitch">
|
|
<Setter Property="Foreground" Value="{ThemeResource ToggleSwitchForegroundThemeBrush}"/>
|
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
|
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/>
|
|
<Setter Property="MinWidth" Value="154"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToggleSwitch">
|
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal"/>
|
|
<VisualState x:Name="PointerOver">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="SwitchCurtain">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchCurtainPointerOverBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="InnerBorder">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchTrackPointerOverBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="SwitchKnob">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchThumbPointerOverBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="SwitchKnob">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchThumbPointerOverBorderThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="SwitchCurtain">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchCurtainPressedBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="InnerBorder">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchTrackPressedBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="SwitchKnob">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchThumbPressedBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="SwitchKnob">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchThumbPressedForegroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="HeaderContentPresenter">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchHeaderDisabledForegroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="OffContentPresenter">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchDisabledForegroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="OnContentPresenter">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchDisabledForegroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="OuterBorder">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchOuterBorderDisabledBorderThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="InnerBorder">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchTrackDisabledBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="SwitchKnob">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchThumbDisabledBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="SwitchKnob">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchThumbDisabledBorderThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="SwitchCurtain">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchCurtainDisabledBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="ToggleStates">
|
|
<VisualStateGroup.Transitions>
|
|
<VisualTransition x:Name="DraggingToOnTransition" From="Dragging" GeneratedDuration="0" To="On">
|
|
<Storyboard>
|
|
<RepositionThemeAnimation FromHorizontalOffset="{Binding TemplateSettings.KnobCurrentToOnOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}" TargetName="SwitchKnob"/>
|
|
<RepositionThemeAnimation FromHorizontalOffset="{Binding TemplateSettings.CurtainCurrentToOnOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}" TargetName="SwitchCurtain"/>
|
|
</Storyboard>
|
|
</VisualTransition>
|
|
<VisualTransition x:Name="DraggingToOffTransition" From="Dragging" GeneratedDuration="0" To="Off">
|
|
<Storyboard>
|
|
<RepositionThemeAnimation FromHorizontalOffset="{Binding TemplateSettings.KnobCurrentToOffOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}" TargetName="SwitchKnob"/>
|
|
<RepositionThemeAnimation FromHorizontalOffset="{Binding TemplateSettings.CurtainCurrentToOffOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}" TargetName="SwitchCurtain"/>
|
|
</Storyboard>
|
|
</VisualTransition>
|
|
<VisualTransition x:Name="OnToOffTransition" From="On" GeneratedDuration="0" To="Off">
|
|
<Storyboard>
|
|
<RepositionThemeAnimation FromHorizontalOffset="{Binding TemplateSettings.KnobOnToOffOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}" TargetName="SwitchKnob"/>
|
|
<RepositionThemeAnimation FromHorizontalOffset="{Binding TemplateSettings.CurtainOnToOffOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}" TargetName="SwitchCurtain"/>
|
|
</Storyboard>
|
|
</VisualTransition>
|
|
<VisualTransition x:Name="OffToOnTransition" From="Off" GeneratedDuration="0" To="On">
|
|
<Storyboard>
|
|
<RepositionThemeAnimation FromHorizontalOffset="{Binding TemplateSettings.KnobOffToOnOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}" TargetName="SwitchKnob"/>
|
|
<RepositionThemeAnimation FromHorizontalOffset="{Binding TemplateSettings.CurtainOffToOnOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}" TargetName="SwitchCurtain"/>
|
|
</Storyboard>
|
|
</VisualTransition>
|
|
</VisualStateGroup.Transitions>
|
|
<VisualState x:Name="Dragging"/>
|
|
<VisualState x:Name="Off">
|
|
<Storyboard>
|
|
<DoubleAnimation Duration="0" To="-44" Storyboard.TargetProperty="X" Storyboard.TargetName="CurtainTranslateTransform"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="On">
|
|
<Storyboard>
|
|
<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="CurtainTranslateTransform"/>
|
|
<DoubleAnimation Duration="0" To="38" Storyboard.TargetProperty="X" Storyboard.TargetName="KnobTranslateTransform"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="ContentStates">
|
|
<VisualState x:Name="OffContent">
|
|
<Storyboard>
|
|
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="OffContentPresenter"/>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="OffContentPresenter">
|
|
<DiscreteObjectKeyFrame KeyTime="0">
|
|
<DiscreteObjectKeyFrame.Value>
|
|
<x:Boolean>True</x:Boolean>
|
|
</DiscreteObjectKeyFrame.Value>
|
|
</DiscreteObjectKeyFrame>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="OnContent">
|
|
<Storyboard>
|
|
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="OnContentPresenter"/>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="OnContentPresenter">
|
|
<DiscreteObjectKeyFrame KeyTime="0">
|
|
<DiscreteObjectKeyFrame.Value>
|
|
<x:Boolean>True</x:Boolean>
|
|
</DiscreteObjectKeyFrame.Value>
|
|
</DiscreteObjectKeyFrame>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="FocusStates">
|
|
<VisualState x:Name="Focused">
|
|
<Storyboard>
|
|
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualWhite"/>
|
|
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualBlack"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Unfocused"/>
|
|
<VisualState x:Name="PointerFocused"/>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<ContentPresenter x:Name="HeaderContentPresenter" AutomationProperties.AccessibilityView="Raw" Grid.ColumnSpan="2" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" Foreground="{ThemeResource ToggleSwitchHeaderForegroundThemeBrush}" FontWeight="Semilight" Margin="6"/>
|
|
<Grid Margin="{TemplateBinding Padding}" Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="7"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<ContentPresenter x:Name="OffContentPresenter" AutomationProperties.AccessibilityView="Raw" ContentTemplate="{TemplateBinding OffContentTemplate}" Content="{TemplateBinding OffContent}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" Margin="6,5,0,16" MinWidth="65" Opacity="0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
|
<ContentPresenter x:Name="OnContentPresenter" AutomationProperties.AccessibilityView="Raw" ContentTemplate="{TemplateBinding OnContentTemplate}" Content="{TemplateBinding OnContent}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" Margin="6,5,0,16" MinWidth="65" Opacity="0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
|
<Grid Background="Transparent" Grid.Column="2" ManipulationMode="None">
|
|
<Grid x:Name="SwitchKnobBounds" Height="19" Margin="13,5,13,16">
|
|
<Border x:Name="OuterBorder" BorderBrush="{ThemeResource ToggleSwitchOuterBorderBorderThemeBrush}" BorderThickness="2">
|
|
<Border x:Name="InnerBorder" BorderBrush="{ThemeResource ToggleSwitchTrackBorderThemeBrush}" BorderThickness="1" Background="{ThemeResource ToggleSwitchTrackBackgroundThemeBrush}">
|
|
<ContentPresenter x:Name="SwitchCurtainBounds">
|
|
<ContentPresenter x:Name="SwitchCurtainClip">
|
|
<Rectangle x:Name="SwitchCurtain" Fill="{ThemeResource ToggleSwitchCurtainBackgroundThemeBrush}" Width="44">
|
|
<Rectangle.RenderTransform>
|
|
<TranslateTransform x:Name="CurtainTranslateTransform" X="-44"/>
|
|
</Rectangle.RenderTransform>
|
|
</Rectangle>
|
|
</ContentPresenter>
|
|
</ContentPresenter>
|
|
</Border>
|
|
</Border>
|
|
<Rectangle x:Name="SwitchKnob" Fill="{ThemeResource ToggleSwitchThumbBackgroundThemeBrush}" HorizontalAlignment="Left" Stroke="{ThemeResource ToggleSwitchThumbBorderThemeBrush}" StrokeThickness="1" Width="12">
|
|
<Rectangle.RenderTransform>
|
|
<TranslateTransform x:Name="KnobTranslateTransform"/>
|
|
</Rectangle.RenderTransform>
|
|
</Rectangle>
|
|
<Rectangle x:Name="FocusVisualWhite" Margin="-3" Opacity="0" StrokeDashOffset="1.5" StrokeEndLineCap="Square" Stroke="{ThemeResource FocusVisualWhiteStrokeThemeBrush}" StrokeDashArray="1,1"/>
|
|
<Rectangle x:Name="FocusVisualBlack" Margin="-3" Opacity="0" StrokeDashOffset="0.5" StrokeEndLineCap="Square" Stroke="{ThemeResource FocusVisualBlackStrokeThemeBrush}" StrokeDashArray="1,1"/>
|
|
</Grid>
|
|
<Thumb x:Name="SwitchThumb" AutomationProperties.AccessibilityView="Raw">
|
|
<Thumb.Template>
|
|
<ControlTemplate TargetType="Thumb">
|
|
<Rectangle Fill="Transparent"/>
|
|
</ControlTemplate>
|
|
</Thumb.Template>
|
|
</Thumb>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</ResourceDictionary>
|
|
|