/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App.Controls/Toolbar/ToolbarToggleButton/ToolbarToggleButton.xaml
343 строки
22 KB
Yair
Code Quality: Updated license header
31 дек 2024, 05:03
31 дек 2024, 05:03
8436c6d
Код
Авторство
О чём код?
<!-- Copyright (c) Files Community. Licensed under the MIT License. --> <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:Files.App.Controls" xmlns:muxc="using:Microsoft.UI.Xaml.Controls"> <Style BasedOn="{StaticResource DefaultToolbarToggleButtonStyle}" TargetType="local:ToolbarToggleButton" /> <Style x:Key="DefaultToolbarToggleButtonStyle" TargetType="local:ToolbarToggleButton"> <Setter Property="Background" Value="{ThemeResource ToolbarToggleButtonBackground}" /> <Setter Property="BackgroundSizing" Value="OuterBorderEdge" /> <Setter Property="Foreground" Value="{ThemeResource ToolbarToggleButtonForeground}" /> <Setter Property="BorderBrush" Value="{ThemeResource ToolbarToggleButtonBorderBrush}" /> <Setter Property="BorderThickness" Value="{ThemeResource ToolbarToggleButtonBorderThemeThickness}" /> <Setter Property="Padding" Value="{StaticResource ToolbarToggleButtonPadding}" /> <Setter Property="HorizontalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" /> <Setter Property="FontWeight" Value="Normal" /> <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" /> <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" /> <Setter Property="FocusVisualMargin" Value="-3" /> <Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" /> <Setter Property="ToolTipService.Placement" Value="Bottom" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="local:ToolbarToggleButton"> <Grid x:Name="GridRoot" MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}" Padding="0" muxc:AnimatedIcon.State="Normal" AutomationProperties.AccessibilityView="Raw" Background="{TemplateBinding Background}" BackgroundSizing="{TemplateBinding BackgroundSizing}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" ToolTipService.Placement="{TemplateBinding ToolTipService.Placement}" ToolTipService.ToolTip="{TemplateBinding Label}"> <Grid x:Name="CheckedVisual" Padding="{TemplateBinding Padding}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BackgroundSizing="InnerBorderEdge" BorderBrush="{ThemeResource ToolbarToggleInnerBorderBrush}" BorderThickness="0" CornerRadius="{ThemeResource ToolbarToggleButtonInnerBorderCornerRadius}"> <ContentPresenter xmlns:muxc="using:Microsoft.UI.Xaml.Controls" x:Name="PART_ContentPresenter" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" muxc:AnimatedIcon.State="Normal" AutomationProperties.AccessibilityView="Raw" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" Foreground="{TemplateBinding Foreground}" IsTabStop="False" Visibility="Collapsed" /> <local:ThemedIcon x:Name="PART_ThemedIcon" Width="{TemplateBinding IconSize}" Height="{TemplateBinding IconSize}" IconSize="{TemplateBinding IconSize}" IsFocusEngagementEnabled="False" IsTabStop="False" IsToggled="False" Opacity="1" Style="{TemplateBinding ThemedIcon}" /> </Grid> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal" /> <VisualState x:Name="PointerOver"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="Background"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBackgroundPointerOver}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderBrush"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBorderBrushPointerOver}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Foreground"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonForegroundPointerOver}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> <VisualState.Setters> <Setter Target="PART_ContentPresenter.(muxc:AnimatedIcon.State)" Value="PointerOver" /> </VisualState.Setters> </VisualState> <VisualState x:Name="Pressed"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="Background"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBackgroundPressed}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderBrush"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBorderBrushPressed}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Foreground"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonForegroundPressed}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> <VisualState.Setters> <Setter Target="PART_ContentPresenter.(muxc:AnimatedIcon.State)" Value="Pressed" /> </VisualState.Setters> </VisualState> <VisualState x:Name="Disabled"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="Background"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBackgroundDisabled}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderBrush"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBorderBrushDisabled}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Foreground"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonForegroundDisabled}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> <VisualState.Setters> <!-- DisabledVisual Should be handled by the control, not the animated icon. --> <Setter Target="PART_ContentPresenter.(muxc:AnimatedIcon.State)" Value="Normal" /> <Setter Target="PART_ThemedIcon.IsEnabled" Value="False" /> </VisualState.Setters> </VisualState> <VisualState x:Name="Checked"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="Background"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBackgroundChecked}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderBrush"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBorderBrushChecked}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderThickness"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonCheckedBorderThemeThickness}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="BorderThickness"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonCheckedInnerBorderThemeThickness}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Foreground"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonForegroundChecked}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> <VisualState.Setters> <Setter Target="CheckedVisual.BorderThickness" Value="1" /> </VisualState.Setters> </VisualState> <VisualState x:Name="CheckedPointerOver"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="Background"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBackgroundCheckedPointerOver}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderBrush"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBorderBrushCheckedPointerOver}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderThickness"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonCheckedBorderThemeThickness}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="BorderThickness"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonCheckedInnerBorderThemeThickness}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Foreground"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonForegroundCheckedPointerOver}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> <VisualState.Setters> <Setter Target="PART_ContentPresenter.(muxc:AnimatedIcon.State)" Value="PointerOver" /> <Setter Target="CheckedVisual.BorderThickness" Value="1" /> </VisualState.Setters> </VisualState> <VisualState x:Name="CheckedPressed"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="Background"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBackgroundCheckedPressed}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderBrush"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBorderBrushCheckedPressed}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderThickness"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonCheckedBorderThemeThickness}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="BorderThickness"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonCheckedInnerBorderThemeThickness}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Foreground"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonForegroundCheckedPressed}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> <VisualState.Setters> <Setter Target="PART_ContentPresenter.(muxc:AnimatedIcon.State)" Value="Pressed" /> <Setter Target="CheckedVisual.BorderThickness" Value="1" /> </VisualState.Setters> </VisualState> <VisualState x:Name="CheckedDisabled"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="Background"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBackgroundCheckedDisabled}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderBrush"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBorderBrushCheckedDisabled}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderThickness"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonCheckedBorderThemeThickness}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="BorderThickness"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonCheckedInnerBorderThemeThickness}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Foreground"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonForegroundCheckedDisabled}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> <VisualState.Setters> <!-- DisabledVisual Should be handled by the control, not the animated icon. --> <Setter Target="PART_ContentPresenter.(muxc:AnimatedIcon.State)" Value="Normal" /> <Setter Target="PART_ThemedIcon.IsEnabled" Value="False" /> <Setter Target="CheckedVisual.Visibility" Value="Visible" /> </VisualState.Setters> </VisualState> <VisualState x:Name="Indeterminate"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="Background"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBackgroundIndeterminate}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderBrush"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBorderBrushIndeterminate}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderThickness"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonCheckedBorderThemeThickness}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="BorderThickness"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonCheckedInnerBorderThemeThickness}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Foreground"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonForegroundIndeterminate}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="IndeterminatePointerOver"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="Background"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBackgroundIndeterminatePointerOver}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderBrush"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBorderBrushIndeterminatePointerOver}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderThickness"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonCheckedBorderThemeThickness}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="BorderThickness"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonCheckedInnerBorderThemeThickness}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Foreground"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonForegroundIndeterminatePointerOver}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> <VisualState.Setters> <Setter Target="PART_ContentPresenter.(muxc:AnimatedIcon.State)" Value="PointerOver" /> </VisualState.Setters> </VisualState> <VisualState x:Name="IndeterminatePressed"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="Background"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBackgroundIndeterminatePressed}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderBrush"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBorderBrushIndeterminatePressed}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderThickness"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonCheckedBorderThemeThickness}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="BorderThickness"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonCheckedInnerBorderThemeThickness}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Foreground"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonForegroundIndeterminatePressed}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> <VisualState.Setters> <Setter Target="PART_ContentPresenter.(muxc:AnimatedIcon.State)" Value="Pressed" /> </VisualState.Setters> </VisualState> <VisualState x:Name="IndeterminateDisabled"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="Background"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBackgroundIndeterminateDisabled}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderBrush"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonBorderBrushIndeterminateDisabled}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridRoot" Storyboard.TargetProperty="BorderThickness"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonCheckedBorderThemeThickness}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="BorderThickness"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonCheckedInnerBorderThemeThickness}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Foreground"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToolbarToggleButtonForegroundIndeterminateDisabled}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> <VisualState.Setters> <!-- DisabledVisual Should be handled by the control, not the animated icon. --> <Setter Target="PART_ContentPresenter.(muxc:AnimatedIcon.State)" Value="Normal" /> <Setter Target="PART_ThemedIcon.IsEnabled" Value="False" /> </VisualState.Setters> </VisualState> </VisualStateGroup> <VisualStateGroup x:Name="ContentStates"> <VisualState x:Name="HasContent"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ThemedIcon" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed" /> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="HasNoContent"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ThemedIcon" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" /> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary>