You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
617 lines
38 KiB
617 lines
38 KiB
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:themeconverters="clr-namespace:MediaBrowser.Plugins.DefaultTheme.Converters"
|
|
xmlns:DTO="clr-namespace:MediaBrowser.Model.DTO;assembly=MediaBrowser.Model"
|
|
xmlns:themecontrols="clr-namespace:MediaBrowser.Plugins.DefaultTheme.Controls"
|
|
xmlns:ee="http://schemas.microsoft.com/expression/2010/effects"
|
|
xmlns:ViewModels="clr-namespace:MediaBrowser.UI.ViewModels;assembly=MediaBrowser.UI"
|
|
xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
|
|
x:Class="MediaBrowser.Plugins.DefaultTheme.Resources.AppResources">
|
|
|
|
<themeconverters:WeatherImageConverter x:Key="WeatherImageConverter"></themeconverters:WeatherImageConverter>
|
|
|
|
<Style TargetType="Grid" x:Key="WindowBackgroundContent">
|
|
<Setter Property="Background">
|
|
<Setter.Value>
|
|
<LinearGradientBrush SpreadMethod="Reflect" ColorInterpolationMode="SRgbLinearInterpolation" StartPoint="0,0" EndPoint="0,1" >
|
|
<GradientStop Color="#ff000000" Offset="0" />
|
|
<GradientStop Color="#ffbbbbbb" Offset="1" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="Grid" x:Key="WindowBackgroundContentDuringPlayback">
|
|
<Setter Property="Opacity" Value=".75"/>
|
|
<Setter Property="Background">
|
|
<Setter.Value>
|
|
<LinearGradientBrush SpreadMethod="Reflect" ColorInterpolationMode="SRgbLinearInterpolation" StartPoint="0,0" EndPoint="0,1" >
|
|
<GradientStop Color="#ff000000" Offset="0" />
|
|
<GradientStop Color="#ffbbbbbb" Offset="1" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!--Default font for text. Themes should override these as needed-->
|
|
<Brush x:Key="DefaultForeground">#ffffff</Brush>
|
|
|
|
<!--Default font for small text. Themes should override these as needed-->
|
|
<Brush x:Key="SmallForeground">#ffffff</Brush>
|
|
|
|
<!--Default font for h1 headers. Themes should override these as needed-->
|
|
<Brush x:Key="Heading1Foreground">#ffffff</Brush>
|
|
|
|
<!--Default font for h2 headers. Themes should override these as needed-->
|
|
<Brush x:Key="Heading2Foreground">#ffffff</Brush>
|
|
|
|
<DataTemplate DataType="{x:Type DTO:DtoUser}">
|
|
<Grid HorizontalAlignment="Left">
|
|
<Border Background="{Binding Converter={StaticResource MetroTileBackgroundConverter},Mode=OneWay}">
|
|
<Image Stretch="Uniform" Width="330" Height="330">
|
|
<Image.Style>
|
|
<Style TargetType="{x:Type Image}">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding HasPrimaryImage}" Value="true">
|
|
<Setter Property="Image.Source" Value="{Binding Converter={StaticResource UserImageConverter}, ConverterParameter='0,0,0,0',Mode=OneWay}" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding HasPrimaryImage}" Value="false">
|
|
<Setter Property="Image.Source" Value="../Resources/Images/UserLoginDefault.png" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Image.Style>
|
|
</Image>
|
|
</Border>
|
|
|
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
|
|
<Grid.Background>
|
|
<SolidColorBrush Color="#A6000000"></SolidColorBrush>
|
|
</Grid.Background>
|
|
<StackPanel Orientation="Vertical" Margin="10 5 0 10">
|
|
<TextBlock Foreground="White" Text="{Binding Name,Mode=OneWay}" Style="{StaticResource TextBlockStyle}"></TextBlock>
|
|
<TextBlock Foreground="White" Text="{Binding Converter={StaticResource LastSeenTextConverter},Mode=OneWay}" Style="{StaticResource SmallTextBlockStyle}"></TextBlock>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate x:Key="HomePageListBoxItemTemplate" DataType="{x:Type ViewModels:DtoBaseItemViewModel}">
|
|
<themecontrols:HomePageTile DataContext="{Binding Mode=OneWay}"></themecontrols:HomePageTile>
|
|
</DataTemplate>
|
|
|
|
<Style x:Key="SpotlightButtonStyle" TargetType="{x:Type Button}">
|
|
<Setter Property="SnapsToDevicePixels" Value="true"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Margin" Value="0"/>
|
|
<Setter Property="Padding" Value="0"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Border x:Name="Bd" SnapsToDevicePixels="true" RenderTransformOrigin="0.5,0.5" Padding="3">
|
|
<Border.RenderTransform>
|
|
<TransformGroup>
|
|
<ScaleTransform/>
|
|
<SkewTransform/>
|
|
<RotateTransform/>
|
|
<TranslateTransform/>
|
|
</TransformGroup>
|
|
</Border.RenderTransform>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualStateGroup.Transitions>
|
|
<VisualTransition GeneratedDuration="0:0:0.25"/>
|
|
</VisualStateGroup.Transitions>
|
|
<VisualState x:Name="Normal"/>
|
|
<VisualState x:Name="MouseOver">
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled"/>
|
|
<VisualState x:Name="Focused">
|
|
<Storyboard>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="Bd">
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="1.035">
|
|
<EasingDoubleKeyFrame.EasingFunction>
|
|
<ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
|
|
</EasingDoubleKeyFrame.EasingFunction>
|
|
</EasingDoubleKeyFrame>
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="Bd">
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="1.035">
|
|
<EasingDoubleKeyFrame.EasingFunction>
|
|
<ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
|
|
</EasingDoubleKeyFrame.EasingFunction>
|
|
</EasingDoubleKeyFrame>
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="Bd">
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="0">
|
|
<EasingDoubleKeyFrame.EasingFunction>
|
|
<ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
|
|
</EasingDoubleKeyFrame.EasingFunction>
|
|
</EasingDoubleKeyFrame>
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Bd">
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="0">
|
|
<EasingDoubleKeyFrame.EasingFunction>
|
|
<ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
|
|
</EasingDoubleKeyFrame.EasingFunction>
|
|
</EasingDoubleKeyFrame>
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.Opacity)" Storyboard.TargetName="BdDropShadow">
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="1">
|
|
<EasingDoubleKeyFrame.EasingFunction>
|
|
<ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
|
|
</EasingDoubleKeyFrame.EasingFunction>
|
|
</EasingDoubleKeyFrame>
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
<Grid x:Name="ContentGrid">
|
|
<Border x:Name="BdDropShadow" Margin="-15" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{DynamicResource SelectedItemHighlightColor}" SnapsToDevicePixels="true" CornerRadius="10" Visibility="Hidden">
|
|
<Border.Effect>
|
|
<BlurEffect Radius="10" KernelType="Gaussian"></BlurEffect>
|
|
</Border.Effect>
|
|
</Border>
|
|
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsFocused" Value="true">
|
|
<Setter Property="Visibility" TargetName="BdDropShadow" Value="Visible"/>
|
|
<Setter Property="Panel.ZIndex" Value="5"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!--Item logos. -->
|
|
<Style TargetType="Image" x:Key="ItemLogo">
|
|
<Setter Property="Margin" Value="0 10 0 0"/>
|
|
<Setter Property="MaxHeight" Value="100"/>
|
|
<Setter Property="MaxWidth" Value="700"/>
|
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
|
<Setter Property="Stretch" Value="Uniform"/>
|
|
</Style>
|
|
|
|
<!--Override PageContentTemplate-->
|
|
<ControlTemplate x:Key="PageContentTemplate">
|
|
|
|
<Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0 10 0 0">
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto"></RowDefinition>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel x:Name="PageTitlePanel" Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="30 0 0 0">
|
|
</StackPanel>
|
|
|
|
<StackPanel x:Name="HeaderContent" Orientation="Horizontal" Panel.ZIndex="3" Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0 10 30 0">
|
|
|
|
<Button x:Name="NowPlayingButton" Style="{StaticResource ImageButton}" Margin="0 0 40 0" Visibility="Collapsed" Click="NowPlaying_Click">
|
|
<Image Source="..\Resources\Images\NowPlayingButton.png" />
|
|
</Button>
|
|
|
|
<Button x:Name="ViewButton" Style="{StaticResource ImageButton}" Margin="0 0 40 0" Visibility="Collapsed">
|
|
<Image Source="..\Resources\Images\ViewButton.png" />
|
|
</Button>
|
|
|
|
<Button Style="{StaticResource ImageButton}" Margin="0 0 40 0">
|
|
<Image Source="..\Resources\Images\SearchButton.png" />
|
|
</Button>
|
|
|
|
<Button Style="{StaticResource ImageButton}" Margin="0 0 50 0" Click="SettingsButtonClick">
|
|
<Image Source="..\Resources\Images\SettingsButton.png" />
|
|
</Button>
|
|
|
|
<!--Display CurrentUser-->
|
|
<StackPanel Orientation="Horizontal" Margin="0 0 50 0" Visibility="{Binding Path=CurrentUser,Converter={StaticResource CurrentUserVisibilityConverter},Mode=OneWay}">
|
|
<Button Style="{StaticResource ImageButton}">
|
|
<Image Height="64">
|
|
<Image.Style>
|
|
<Style TargetType="{x:Type Image}">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding Path=CurrentUser.HasPrimaryImage,Mode=OneWay}" Value="true">
|
|
<Setter Property="Image.Source" Value="{Binding Path=CurrentUser,Converter={StaticResource UserImageConverter}, ConverterParameter='0,0,0,0',Mode=OneWay}" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding Path=CurrentUser.HasPrimaryImage}" Value="false">
|
|
<Setter Property="Image.Source" Value="Images\CurrentUserDefault.png" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Image.Style>
|
|
</Image>
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
<!--Display Weather-->
|
|
<StackPanel Orientation="Horizontal" Margin="0 0 50 0" Visibility="{Binding Path=CurrentWeather,Converter={StaticResource WeatherVisibilityConverter},Mode=OneWay}">
|
|
|
|
<TextBlock Style="{StaticResource Heading2TextBlockStyle}" Text="{Binding Path=CurrentWeather,Converter={StaticResource WeatherTemperatureConverter},Mode=OneWay}">
|
|
</TextBlock>
|
|
<Button Style="{StaticResource ImageButton}" Click="WeatherButtonClick">
|
|
<Image Source="{Binding Path=CurrentWeather,Converter={StaticResource WeatherImageConverter},Mode=OneWay}"></Image>
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
<!--Display Clock-->
|
|
<TextBlock Style="{StaticResource Heading2TextBlockStyle}">
|
|
<TextBlock.Text>
|
|
<Binding Path="CurrentTime" Converter="{StaticResource DateTimeToStringConverter}" ConverterParameter="h:mm" />
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
<TextBlock Style="{StaticResource Heading2TextBlockStyle}" Foreground="#52B54B">
|
|
<TextBlock.Text>
|
|
<Binding Path="CurrentTime" Converter="{StaticResource DateTimeToStringConverter}" ConverterParameter="timesuffixlower" />
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
|
|
<!--Add the frame to hold the pages. The UI core expects this to appear somewhere within the template.-->
|
|
<controls:TransitionFrame x:Name="PageFrame" Grid.Row="1">
|
|
<controls:TransitionFrame.TransitionAnimation>
|
|
<DoubleAnimation Duration="0:0:0.35" >
|
|
<DoubleAnimation.EasingFunction>
|
|
<ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
|
|
</DoubleAnimation.EasingFunction>
|
|
</DoubleAnimation>
|
|
</controls:TransitionFrame.TransitionAnimation>
|
|
<controls:TransitionFrame.TransitionType>
|
|
<ee:SlideInTransitionEffect SlideDirection="RightToLeft"></ee:SlideInTransitionEffect>
|
|
</controls:TransitionFrame.TransitionType>
|
|
</controls:TransitionFrame>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
|
|
<DataTemplate x:Key="ItemSpecialFeaturesTemplate" DataType="{x:Type ViewModels:SpecialFeatureViewModel}">
|
|
<Grid HorizontalAlignment="Left">
|
|
|
|
<Border Width="{Binding Path=ImageWidth}" Height="{Binding Path=ImageHeight}">
|
|
<Border.Background>
|
|
<LinearGradientBrush SpreadMethod="Reflect" ColorInterpolationMode="SRgbLinearInterpolation" StartPoint="0,0" EndPoint="0,1" >
|
|
<GradientStop Color="#ff545358" Offset="0" />
|
|
<GradientStop Color="#ffCBCBCB" Offset="1" />
|
|
</LinearGradientBrush>
|
|
</Border.Background>
|
|
<Image>
|
|
<Image.Style>
|
|
<Style TargetType="{x:Type Image}">
|
|
<Setter Property="Stretch" Value="Uniform" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding Path=Item.HasPrimaryImage}" Value="True">
|
|
<Setter Property="Source" Value="{Binding Path=Image}" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding Path=Item.HasPrimaryImage}" Value="False">
|
|
<Setter Property="Source" Value="../Resources/Images/ChapterDefault.png" />
|
|
<Setter Property="VerticalAlignment" Value="Top" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Image.Style>
|
|
</Image>
|
|
</Border>
|
|
|
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
|
|
<Grid.Background>
|
|
<SolidColorBrush Color="#A6000000"></SolidColorBrush>
|
|
</Grid.Background>
|
|
<StackPanel Orientation="Vertical" Margin="10 5 0 10">
|
|
<TextBlock Foreground="White" Text="{Binding Path=Item.Name}" Style="{StaticResource TextBlockStyle}"></TextBlock>
|
|
<TextBlock Foreground="White" Text="{Binding Path=MinutesString}" Style="{StaticResource SmallTextBlockStyle}"></TextBlock>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate x:Key="ItemPerformersTemplate" DataType="{x:Type ViewModels:DtoBaseItemViewModel}">
|
|
<Grid HorizontalAlignment="Left">
|
|
|
|
<TextBlock Text="{Binding Path=Item.Name}"></TextBlock>
|
|
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate x:Key="ItemChaptersTemplate" DataType="{x:Type ViewModels:ChapterInfoDtoViewModel}">
|
|
<Grid HorizontalAlignment="Left">
|
|
|
|
<Border Width="{Binding Path=ImageWidth}" Height="{Binding Path=ImageHeight}">
|
|
<Border.Background>
|
|
<LinearGradientBrush SpreadMethod="Reflect" ColorInterpolationMode="SRgbLinearInterpolation" StartPoint="0,0" EndPoint="0,1" >
|
|
<GradientStop Color="#ff545358" Offset="0" />
|
|
<GradientStop Color="#ffCBCBCB" Offset="1" />
|
|
</LinearGradientBrush>
|
|
</Border.Background>
|
|
<Image>
|
|
<Image.Style>
|
|
<Style TargetType="{x:Type Image}">
|
|
<Setter Property="Stretch" Value="Uniform" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding Path=Chapter.HasImage}" Value="True">
|
|
<Setter Property="Source" Value="{Binding Path=Image}" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding Path=Chapter.HasImage}" Value="False">
|
|
<Setter Property="Source" Value="../Resources/Images/ChapterDefault.png" />
|
|
<Setter Property="VerticalAlignment" Value="Top" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Image.Style>
|
|
</Image>
|
|
</Border>
|
|
|
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
|
|
<Grid.Background>
|
|
<SolidColorBrush Color="#A6000000"></SolidColorBrush>
|
|
</Grid.Background>
|
|
<StackPanel Orientation="Vertical" Margin="10 5 0 10">
|
|
<TextBlock Foreground="White" Text="{Binding Path=Chapter.Name}" Style="{StaticResource TextBlockStyle}"></TextBlock>
|
|
<TextBlock Foreground="White" Text="{Binding Path=TimeString}" Style="{StaticResource SmallTextBlockStyle}"></TextBlock>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate x:Key="ItemGalleryTemplate" DataType="{x:Type BitmapImage}">
|
|
<Image Source="{Binding}" Height="297" VerticalAlignment="Center" HorizontalAlignment="Center">
|
|
|
|
</Image>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate x:Key="ListPageItemTemplate" DataType="{x:Type ViewModels:DtoBaseItemViewModel}">
|
|
<themecontrols:BaseItemTile DataContext="{Binding}"></themecontrols:BaseItemTile>
|
|
</DataTemplate>
|
|
|
|
<!--List Page ListBox. -->
|
|
<Style TargetType="controls:ExtendedListBox" x:Key="ListPageListBoxStyle" BasedOn="{StaticResource ListBoxStyle}">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding Path=DisplayPreferences.ViewType,Mode=OneWay}" Value="Poster">
|
|
<Setter Property="ItemTemplate" Value="{StaticResource ListPageItemTemplate}"></Setter>
|
|
<Setter Property="ItemsPanel">
|
|
<Setter.Value>
|
|
<ItemsPanelTemplate>
|
|
<controls:VirtualizingWrapPanel ItemHeight="{Binding Path=DisplayPreferences.PrimaryImageHeight,Mode=OneWay}" ItemWidth="{Binding Path=DisplayPreferences.PrimaryImageWidth,Mode=OneWay}" Orientation="{Binding WrapPanelOrientation}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="20 50 20 50">
|
|
</controls:VirtualizingWrapPanel>
|
|
</ItemsPanelTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding Path=DisplayPreferences.ViewType,Mode=OneWay}" Value="CoverFlow">
|
|
<Setter Property="ItemTemplate" Value="{StaticResource ListPageItemTemplate}"></Setter>
|
|
<Setter Property="ItemsPanel">
|
|
<Setter.Value>
|
|
<ItemsPanelTemplate>
|
|
<VirtualizingStackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="50"></VirtualizingStackPanel>
|
|
</ItemsPanelTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding Path=DisplayPreferences.ViewType,Mode=OneWay}" Value="ThumbStrip">
|
|
<Setter Property="ItemTemplate" Value="{StaticResource ListPageItemTemplate}"></Setter>
|
|
<Setter Property="ItemsPanel">
|
|
<Setter.Value>
|
|
<ItemsPanelTemplate>
|
|
<VirtualizingStackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="50"></VirtualizingStackPanel>
|
|
</ItemsPanelTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding Path=DisplayPreferences.ViewType}" Value="List">
|
|
<Setter Property="ItemTemplate" Value="{StaticResource ListPageItemTemplate}"></Setter>
|
|
<Setter Property="ItemsPanel">
|
|
<Setter.Value>
|
|
<ItemsPanelTemplate>
|
|
<VirtualizingStackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="50"></VirtualizingStackPanel>
|
|
</ItemsPanelTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="Button" x:Key="TextButton" BasedOn="{StaticResource ImageButton}">
|
|
<Setter Property="HorizontalAlignment" Value="Left"></Setter>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Border x:Name="Border" Background="{TemplateBinding Background}" BorderThickness="0 0 0 2" BorderBrush="Transparent">
|
|
<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsKeyboardFocused" Value="true">
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="White" />
|
|
</Trigger>
|
|
<Trigger Property="IsFocused" Value="true">
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="White" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="White" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="Gray" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter TargetName="Border" Property="Opacity" Value=".2" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="Button" x:Key="ViewMenuButton" BasedOn="{StaticResource ImageButton}">
|
|
<Setter Property="HorizontalAlignment" Value="Left"></Setter>
|
|
<Setter Property="Margin" Value="0 15 0 0"></Setter>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Border x:Name="Border" Background="{TemplateBinding Background}" BorderThickness="2" BorderBrush="Transparent" Padding="0 5 20 5">
|
|
<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsKeyboardFocused" Value="true">
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="White" />
|
|
</Trigger>
|
|
<Trigger Property="IsFocused" Value="true">
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="White" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="White" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="Gray" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter TargetName="Border" Property="Opacity" Value=".2" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<LinearGradientBrush x:Key="PressedBrush" StartPoint="0,0" EndPoint="0,1">
|
|
<GradientBrush.GradientStops>
|
|
<GradientStopCollection>
|
|
<GradientStop Color="#444" Offset="0.0"/>
|
|
<GradientStop Color="#888" Offset="0.1"/>
|
|
<GradientStop Color="#EEE" Offset="0.9"/>
|
|
<GradientStop Color="#FFF" Offset="1.0"/>
|
|
</GradientStopCollection>
|
|
</GradientBrush.GradientStops>
|
|
</LinearGradientBrush>
|
|
|
|
<!-- Miscellaneous Brushes -->
|
|
<SolidColorBrush x:Key="GlyphBrush" Color="#ffffff" />
|
|
<SolidColorBrush x:Key="FocusBackgroundBrush" Color="#ffffff" />
|
|
<SolidColorBrush x:Key="FocusGlyphBrush" Color="#022255" />
|
|
<SolidColorBrush x:Key="NormalBackgroundBrush" Color="Transparent" />
|
|
<SolidColorBrush x:Key="NormalBorderBrush" Color="#ffffff" />
|
|
|
|
<Style TargetType="RadioButton" x:Key="RadioButtonStyle">
|
|
<Setter Property="HorizontalAlignment" Value="Left"></Setter>
|
|
<Setter Property="BorderBrush" Value="Transparent"></Setter>
|
|
<Setter Property="BorderThickness" Value="2"></Setter>
|
|
<Setter Property="KeyboardNavigation.AcceptsReturn" Value="true"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="true"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type RadioButton}">
|
|
<BulletDecorator Background="Transparent">
|
|
<BulletDecorator.Bullet>
|
|
<Grid Width="32" Height="32" VerticalAlignment="Center">
|
|
<Ellipse x:Name="Border" Fill="{StaticResource NormalBackgroundBrush}" StrokeThickness="3" Stroke="{StaticResource NormalBorderBrush}" />
|
|
<Ellipse x:Name="CheckMark" Margin="8" Fill="{StaticResource GlyphBrush}" />
|
|
</Grid>
|
|
</BulletDecorator.Bullet>
|
|
<ContentPresenter Margin="20,0,0,0" HorizontalAlignment="Left" RecognizesAccessKey="True"/>
|
|
</BulletDecorator>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsKeyboardFocused" Value="true">
|
|
<Setter TargetName="Border" Property="Fill" Value="{StaticResource FocusBackgroundBrush}" />
|
|
<Setter TargetName="CheckMark" Property="Fill" Value="{StaticResource FocusGlyphBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsFocused" Value="true">
|
|
<Setter TargetName="Border" Property="Fill" Value="{StaticResource FocusBackgroundBrush}" />
|
|
<Setter TargetName="CheckMark" Property="Fill" Value="{StaticResource FocusGlyphBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsChecked" Value="false">
|
|
<Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="Border" Property="Fill" Value="{StaticResource FocusBackgroundBrush}" />
|
|
<Setter TargetName="CheckMark" Property="Fill" Value="{StaticResource FocusGlyphBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter TargetName="Border" Property="Fill" Value="{StaticResource PressedBrush}" />
|
|
<Setter TargetName="Border" Property="Stroke" Value="{StaticResource GlyphBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter TargetName="Border" Property="Fill" Value="#eeeeee" />
|
|
<Setter TargetName="Border" Property="Stroke" Value="#40000000" />
|
|
<Setter Property="Foreground" Value="#80000000"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="RadioButton" x:Key="ViewMenuRadioButton" BasedOn="{StaticResource RadioButtonStyle}">
|
|
<Setter Property="Margin" Value="0 25 0 0"></Setter>
|
|
</Style>
|
|
|
|
<LinearGradientBrush x:Key="PressedBorderBrush" StartPoint="0,0" EndPoint="0,1">
|
|
<GradientBrush.GradientStops>
|
|
<GradientStopCollection>
|
|
<GradientStop Color="#444" Offset="0.0"/>
|
|
<GradientStop Color="#888" Offset="1.0"/>
|
|
</GradientStopCollection>
|
|
</GradientBrush.GradientStops>
|
|
</LinearGradientBrush>
|
|
|
|
<SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE" />
|
|
<SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />
|
|
<SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
|
|
|
|
<Style TargetType="CheckBox" x:Key="CheckBoxStyle">
|
|
<Setter Property="SnapsToDevicePixels" Value="true"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="KeyboardNavigation.AcceptsReturn" Value="true"/>
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="CheckBox">
|
|
<BulletDecorator Background="Transparent">
|
|
<BulletDecorator.Bullet>
|
|
<Border x:Name="Border" Width="32" Height="32" CornerRadius="0" Background="{StaticResource NormalBackgroundBrush}" BorderThickness="3" BorderBrush="{StaticResource NormalBorderBrush}">
|
|
<Path Width="15" Height="15" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="CheckMark" SnapsToDevicePixels="False" Stroke="{StaticResource GlyphBrush}" StrokeThickness="10" Data="M 0 0 L 7 7 M 0 7 L 7 0" />
|
|
</Border>
|
|
</BulletDecorator.Bullet>
|
|
<ContentPresenter Margin="20,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" RecognizesAccessKey="True"/>
|
|
</BulletDecorator>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="false">
|
|
<Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed"/>
|
|
</Trigger>
|
|
<Trigger Property="IsKeyboardFocused" Value="true">
|
|
<Setter TargetName="Border" Property="Background" Value="{StaticResource FocusBackgroundBrush}" />
|
|
<Setter TargetName="CheckMark" Property="Stroke" Value="{StaticResource FocusGlyphBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsFocused" Value="true">
|
|
<Setter TargetName="Border" Property="Background" Value="{StaticResource FocusBackgroundBrush}" />
|
|
<Setter TargetName="CheckMark" Property="Stroke" Value="{StaticResource FocusGlyphBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsChecked" Value="{x:Null}">
|
|
<Setter TargetName="CheckMark" Property="Data" Value="M 0 7 L 7 0" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="Border" Property="Background" Value="{StaticResource FocusBackgroundBrush}" />
|
|
<Setter TargetName="CheckMark" Property="Stroke" Value="{StaticResource FocusGlyphBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter TargetName="Border" Property="Background" Value="{StaticResource PressedBrush}" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource PressedBorderBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
|
|
<Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</ResourceDictionary> |