Created
October 18, 2017 20:03
-
-
Save nmetulev/0f35106300830398b4aee75e26c865b5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Style x:Key="ListViewItemStyle1" TargetType="ListViewItem"> | |
| <Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" /> | |
| <Setter Property="Background" Value="Transparent" /> | |
| <Setter Property="Padding" Value="0" /> | |
| <Setter Property="MinHeight" Value="0" /> | |
| <Setter Property="MinWidth" Value="0" /> | |
| <Setter Property="Margin" Value="0,1" /> | |
| <Setter Property="UseSystemFocusVisuals" Value="True" /> | |
| <Setter Property="HorizontalContentAlignment" Value="Stretch" /> | |
| <Setter Property="VerticalContentAlignment" Value="Stretch" /> | |
| <Setter Property="Template"> | |
| <Setter.Value> | |
| <ControlTemplate TargetType="ListViewItem"> | |
| <Grid x:Name="LayoutRoot" | |
| Background="{TemplateBinding Background}" | |
| Control.IsTemplateFocusTarget="True"> | |
| <!-- Wrap SelectionIndicator in a grid so that its offset is 0,0 - this enables the offset animation. --> | |
| <Grid HorizontalAlignment="Left" | |
| VerticalAlignment="Stretch"> | |
| <Rectangle x:Name="SelectionIndicator" | |
| Width="3" | |
| Fill="{ThemeResource SystemControlHighlightAccentBrush}" | |
| Opacity="0.0" > | |
| <Rectangle.RenderTransform> | |
| <CompositeTransform CenterY="50" x:Name="SelectionIndicatorTransform"></CompositeTransform> | |
| </Rectangle.RenderTransform> | |
| </Rectangle> | |
| </Grid> | |
| <ContentPresenter x:Name="ContentPresenter" | |
| Grid.Column="1" | |
| Margin="{TemplateBinding Padding}" | |
| HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" | |
| VerticalAlignment="{TemplateBinding VerticalContentAlignment}" | |
| Content="{TemplateBinding Content}" | |
| ContentTemplate="{TemplateBinding ContentTemplate}" | |
| ContentTransitions="{TemplateBinding ContentTransitions}" /> | |
| <VisualStateManager.VisualStateGroups> | |
| <VisualStateGroup x:Name="PointerStates"> | |
| <VisualState x:Name="Normal" > | |
| <Storyboard> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicator" | |
| Storyboard.TargetProperty="Opacity" | |
| Duration="0:0:0.3" | |
| To="0" /> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicatorTransform" | |
| Storyboard.TargetProperty="ScaleY" | |
| Duration="0:0:0.3" | |
| To="0" /> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicatorTransform" | |
| Storyboard.TargetProperty="ScaleX" | |
| Duration="0:0:0.3" | |
| To="0" /> | |
| </Storyboard> | |
| </VisualState> | |
| <VisualState x:Name="PointerOver"> | |
| <Storyboard> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicator" | |
| Storyboard.TargetProperty="Opacity" | |
| Duration="0:0:0.3" | |
| To="0" /> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicatorTransform" | |
| Storyboard.TargetProperty="ScaleY" | |
| Duration="0:0:0.3" | |
| To="0" /> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicatorTransform" | |
| Storyboard.TargetProperty="ScaleX" | |
| Duration="0:0:0.3" | |
| To="0" /> | |
| </Storyboard> | |
| </VisualState> | |
| <VisualState x:Name="Pressed"> | |
| <Storyboard> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicator" | |
| Storyboard.TargetProperty="Opacity" | |
| Duration="0:0:0.3" | |
| To="0" /> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicatorTransform" | |
| Storyboard.TargetProperty="ScaleY" | |
| Duration="0:0:0.3" | |
| To="0" /> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicatorTransform" | |
| Storyboard.TargetProperty="ScaleX" | |
| Duration="0:0:0.3" | |
| To="0" /> | |
| </Storyboard> | |
| </VisualState> | |
| <VisualState x:Name="Selected"> | |
| <Storyboard> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicator" | |
| Storyboard.TargetProperty="Opacity" | |
| Duration="0:0:0.3" | |
| To="1" /> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicatorTransform" | |
| Storyboard.TargetProperty="ScaleY" | |
| Duration="0:0:0.3" | |
| To="1" /> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicatorTransform" | |
| Storyboard.TargetProperty="ScaleX" | |
| Duration="0:0:0.3" | |
| To="1" /> | |
| </Storyboard> | |
| </VisualState> | |
| <VisualState x:Name="PointerOverSelected"> | |
| <Storyboard> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicator" | |
| Storyboard.TargetProperty="Opacity" | |
| Duration="0:0:0.3" | |
| To="1" /> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicatorTransform" | |
| Storyboard.TargetProperty="ScaleY" | |
| Duration="0:0:0.3" | |
| To="1" /> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicatorTransform" | |
| Storyboard.TargetProperty="ScaleX" | |
| Duration="0:0:0.3" | |
| To="1" /> | |
| </Storyboard> | |
| </VisualState> | |
| <VisualState x:Name="PressedSelected"> | |
| <Storyboard> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicator" | |
| Storyboard.TargetProperty="Opacity" | |
| Duration="0:0:0.3" | |
| To="1" /> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicatorTransform" | |
| Storyboard.TargetProperty="ScaleY" | |
| Duration="0:0:0.3" | |
| To="1" /> | |
| <DoubleAnimation Storyboard.TargetName="SelectionIndicatorTransform" | |
| Storyboard.TargetProperty="ScaleX" | |
| Duration="0:0:0.3" | |
| To="1" /> | |
| </Storyboard> | |
| </VisualState> | |
| </VisualStateGroup> | |
| <VisualStateGroup x:Name="DisabledStates"> | |
| <VisualState x:Name="Enabled" /> | |
| <VisualState x:Name="Disabled"> | |
| <VisualState.Setters> | |
| </VisualState.Setters> | |
| </VisualState> | |
| </VisualStateGroup> | |
| </VisualStateManager.VisualStateGroups> | |
| </Grid> | |
| </ControlTemplate> | |
| </Setter.Value> | |
| </Setter> | |
| </Style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment