Advertisement
TealDeer

slimCat Dark Themes - Theme.xaml (caracal r5)

Nov 16th, 2012
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 44.16 KB | None | 0 0
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2.                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  3.     <!-- Resource Dictionary to hold all of the themes used in the application -->
  4.  
  5.     <ControlTemplate x:Key="EntryBox">
  6.         <Border x:Name="Border" BorderThickness="2" Padding="2"
  7.                                 Background="{StaticResource LightBackgroundBrush}">
  8.             <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
  9.         </Border>
  10.         <ControlTemplate.Triggers>
  11.             <Trigger Property="IsFocused" Value="False">
  12.                 <Setter Property="Effect">
  13.                     <Setter.Value>
  14.                         <BlurEffect Radius="1.25" />
  15.                     </Setter.Value>
  16.                 </Setter>
  17.                 <Setter Property="BorderBrush" TargetName="Border" Value="{StaticResource DepressedBrush}" />
  18.             </Trigger>
  19.             <Trigger Property="IsFocused" Value="True">
  20.                 <Setter Property="BorderBrush" TargetName="Border" Value="{StaticResource HighlightBrush}" />
  21.             </Trigger>
  22.             <Trigger Property="IsEnabled" Value="False">
  23.                 <Setter Property="Focusable" Value="False" />
  24.                 <Setter Property="Background" TargetName="Border" Value="{StaticResource BackgroundBrush}" />
  25.                 <Setter Property="Foreground" Value="{StaticResource DepressedBrush}" />
  26.             </Trigger>
  27.             <Trigger Property="IsEnabled" Value="True">
  28.                 <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
  29.             </Trigger>
  30.         </ControlTemplate.Triggers>
  31.     </ControlTemplate>
  32.  
  33.     <Style TargetType="TextBox">
  34.         <Setter Property="FontSize" Value="18" />
  35.         <Setter Property="Template" Value="{StaticResource EntryBox}" />
  36.     </Style>
  37.    
  38.     <Style TargetType="Hyperlink">
  39.         <Setter Property="Command" Value="{Binding NavigateTo}" />
  40.         <Setter Property="Foreground" Value="{StaticResource DepressedBrush}" />
  41.        
  42.         <Style.Triggers>
  43.             <Trigger Property="IsMouseOver" Value="True">
  44.                 <Setter Property="Foreground" Value="{StaticResource HighlightBrush}"/>
  45.             </Trigger>
  46.         </Style.Triggers>
  47.     </Style>
  48.  
  49.     <Style TargetType="{x:Type CheckBox}">
  50.         <Setter Property="SnapsToDevicePixels" Value="true" />
  51.         <Setter Property="OverridesDefaultStyle" Value="true" />
  52.         <Setter Property="FocusVisualStyle" Value="{DynamicResource CheckBoxFocusVisual}" />
  53.         <Setter Property="Margin" Value="5" />
  54.         <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}"/>
  55.         <Setter Property="BorderBrush" Value="{StaticResource BrightBackgroundBrush}" />
  56.         <Setter Property="Background" Value="Transparent"/>
  57.         <Setter Property="Template">
  58.             <Setter.Value>
  59.                 <ControlTemplate TargetType="{x:Type CheckBox}">
  60.                     <BulletDecorator Background="Transparent">
  61.                         <BulletDecorator.Bullet>
  62.                             <Border x:Name="Border"
  63.                                    Width="13"
  64.                                    Height="13"
  65.                                    CornerRadius="0"
  66.                                    BorderThickness="1"
  67.                                    VerticalAlignment="Center"
  68.                                    BorderBrush="{TemplateBinding BorderBrush}">
  69.                                
  70.                                 <Grid>
  71.                                     <Path Visibility="Collapsed"
  72.                                          Width="7"
  73.                                          Height="7"
  74.                                          x:Name="CheckMark"
  75.                                          SnapsToDevicePixels="False"
  76.                                          StrokeThickness="2"
  77.                                          Data="M 0 0 L 7 7 M 0 7 L 7 0">
  78.                                         <Path.Stroke>
  79.                                             <SolidColorBrush Color="{StaticResource ForegroundColor}" />
  80.                                         </Path.Stroke>
  81.                                     </Path>
  82.                                     <Path Visibility="Collapsed"
  83.                                          Width="7"
  84.                                          Height="7"
  85.                                          x:Name="InderminateMark"
  86.                                          SnapsToDevicePixels="False"
  87.                                          StrokeThickness="2"
  88.                                          Data="M 0 7 L 7 0">
  89.                                         <Path.Stroke>
  90.                                             <SolidColorBrush Color="{StaticResource ForegroundColor}" />
  91.                                         </Path.Stroke>
  92.                                     </Path>
  93.                                 </Grid>
  94.                             </Border>
  95.                         </BulletDecorator.Bullet>
  96.                         <VisualStateManager.VisualStateGroups>
  97.                             <VisualStateGroup x:Name="CommonStates">
  98.                                 <VisualState x:Name="Normal" />
  99.                                 <VisualState x:Name="MouseOver">
  100.                                     <Storyboard>
  101.                                         <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
  102.                                                Storyboard.TargetProperty="BorderBrush.Color">
  103.                                             <EasingColorKeyFrame KeyTime="0"
  104.                                                                 Value="{StaticResource HighlightColor}" />
  105.                                         </ColorAnimationUsingKeyFrames>
  106.                                     </Storyboard>
  107.                                 </VisualState>
  108.                                 <VisualState x:Name="Pressed">
  109.                                     <Storyboard>
  110.                                         <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
  111.                                                Storyboard.TargetProperty="BorderBrush.Color">
  112.                                             <EasingColorKeyFrame KeyTime="0"
  113.                                                Value="{StaticResource DepressedColor}" />
  114.                                         </ColorAnimationUsingKeyFrames>
  115.                                     </Storyboard>
  116.                                 </VisualState>
  117.                                 <VisualState x:Name="Disabled" />
  118.                             </VisualStateGroup>
  119.                             <VisualStateGroup x:Name="CheckStates">
  120.                                 <VisualState x:Name="Checked">
  121.                                     <Storyboard>
  122.                                         <ObjectAnimationUsingKeyFrames
  123.                                                Storyboard.TargetProperty="(UIElement.Visibility)"
  124.                                                 Storyboard.TargetName="CheckMark">
  125.                                             <DiscreteObjectKeyFrame KeyTime="0"
  126.                                            Value="{x:Static Visibility.Visible}" />
  127.                                         </ObjectAnimationUsingKeyFrames>
  128.                                     </Storyboard>
  129.                                 </VisualState>
  130.                                 <VisualState x:Name="Unchecked" />
  131.                                 <VisualState x:Name="Indeterminate">
  132.                                     <Storyboard>
  133.                                         <ObjectAnimationUsingKeyFrames
  134.                                                Storyboard.TargetProperty="(UIElement.Visibility)"
  135.                                                 Storyboard.TargetName="InderminateMark">
  136.                                             <DiscreteObjectKeyFrame KeyTime="0"
  137.                                                                     Value="{x:Static Visibility.Visible}" />
  138.                                         </ObjectAnimationUsingKeyFrames>
  139.                                     </Storyboard>
  140.                                 </VisualState>
  141.                             </VisualStateGroup>
  142.                         </VisualStateManager.VisualStateGroups>
  143.                         <ContentPresenter Margin="4,0,0,0"
  144.                                          VerticalAlignment="Center"
  145.                                          HorizontalAlignment="Left"
  146.                                          RecognizesAccessKey="True" />
  147.                     </BulletDecorator>
  148.                 </ControlTemplate>
  149.             </Setter.Value>
  150.         </Setter>
  151.     </Style>
  152.  
  153.     <Style TargetType="PasswordBox">
  154.         <Setter Property="FontSize" Value="18" />
  155.         <Setter Property="Template" Value="{StaticResource EntryBox}" />
  156.     </Style>
  157.    
  158.     <Style TargetType="{x:Type Button}">
  159.         <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  160.         <Setter Property="BorderThickness" Value="2" />
  161.         <Setter Property="Padding" Value="5" />
  162.         <Setter Property="Foreground" Value="{StaticResource DepressedBrush}" />
  163.         <Setter Property="BorderBrush" Value="{StaticResource DepressedBrush}" />
  164.         <Setter Property="Background" Value="Transparent" />
  165.         <Setter Property="Template">
  166.             <Setter.Value>
  167.                 <ControlTemplate TargetType="Button">
  168.                     <Border x:Name="Root"
  169.                            BorderThickness="{TemplateBinding Property=BorderThickness}"
  170.                            Padding="{TemplateBinding Property=Padding}"
  171.                            TextBlock.Foreground="{TemplateBinding Property=Foreground}"
  172.                            BorderBrush="{TemplateBinding Property=BorderBrush}"
  173.                            Background="{TemplateBinding Property=Background}"
  174.                            RenderTransformOrigin="0.5,0.5">
  175.                         <Border.RenderTransform>
  176.                             <ScaleTransform x:Name="Scale" ScaleX="1" ScaleY="1"/>
  177.                         </Border.RenderTransform>
  178.                        
  179.                         <ContentPresenter x:Name="PART_ContentHost"
  180.                                          OverridesDefaultStyle="True"
  181.                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  182.                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  183.                     </Border>
  184.                     <ControlTemplate.Triggers>
  185.                         <Trigger Property="IsPressed" Value="True">
  186.                             <Setter Property="Background" TargetName="Root"
  187.                                    Value="{StaticResource DepressedBrush}" />
  188.                            
  189.                             <Trigger.EnterActions>
  190.                                 <BeginStoryboard>
  191.                                     <Storyboard>
  192.                                         <DoubleAnimation Storyboard.TargetName="Scale"
  193.                                                         Storyboard.TargetProperty="ScaleX"
  194.                                                         From="1"
  195.                                                         To="0.90" Duration="0:0:0.05">
  196.                                             <DoubleAnimation.EasingFunction>
  197.                                                 <CircleEase EasingMode="EaseOut" />
  198.                                             </DoubleAnimation.EasingFunction>
  199.                                         </DoubleAnimation>
  200.                                         <DoubleAnimation Storyboard.TargetName="Scale"
  201.                                                         From="1"
  202.                                                         Storyboard.TargetProperty="ScaleY"
  203.                                                         To="0.90" Duration="0:0:0.05">
  204.                                             <DoubleAnimation.EasingFunction>
  205.                                                 <CircleEase EasingMode="EaseOut" />
  206.                                             </DoubleAnimation.EasingFunction>
  207.                                         </DoubleAnimation>
  208.                                     </Storyboard>
  209.                                 </BeginStoryboard>
  210.                             </Trigger.EnterActions>
  211.                             <Trigger.ExitActions>
  212.                                 <BeginStoryboard>
  213.                                     <Storyboard>
  214.                                         <DoubleAnimation Storyboard.TargetName="Scale"
  215.                                                         Storyboard.TargetProperty="ScaleX"
  216.                                                         From="0.90"
  217.                                                         To="1" Duration="0:0:0.05">
  218.                                             <DoubleAnimation.EasingFunction>
  219.                                                 <CircleEase EasingMode="EaseIn" />
  220.                                             </DoubleAnimation.EasingFunction>
  221.                                         </DoubleAnimation>
  222.                                         <DoubleAnimation Storyboard.TargetName="Scale"
  223.                                                         From="0.90"
  224.                                                         Storyboard.TargetProperty="ScaleY"
  225.                                                         To="1" Duration="0:0:0.05">
  226.                                             <DoubleAnimation.EasingFunction>
  227.                                                 <CircleEase EasingMode="EaseIn" />
  228.                                             </DoubleAnimation.EasingFunction>
  229.                                         </DoubleAnimation>
  230.                                     </Storyboard>
  231.                                 </BeginStoryboard>
  232.                             </Trigger.ExitActions>
  233.                         </Trigger>
  234.                         <Trigger Property="IsEnabled" Value="True">
  235.                             <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
  236.                          </Trigger>
  237.                         <Trigger Property="IsFocused" Value="True">
  238.                             <Setter Property="BorderBrush" TargetName="Root"
  239.                                    Value="{StaticResource HighlightBrush}" />
  240.                         </Trigger>
  241.                         <Trigger Property="IsMouseOver" Value="True">
  242.                             <Setter Property="BorderBrush" TargetName="Root"
  243.                                    Value="{StaticResource HighlightBrush}" />
  244.                         </Trigger>
  245.                     </ControlTemplate.Triggers>
  246.                 </ControlTemplate>
  247.             </Setter.Value>
  248.         </Setter>
  249.     </Style>
  250.    
  251.     <Style TargetType="{x:Type Button}" x:Key="ChannelMarkupButton" BasedOn="{StaticResource {x:Type Button}}">
  252.         <Setter Property="Padding" Value="0" />
  253.         <Setter Property="Command" Value="{Binding Path=JoinChannelCommand}"/>
  254.     </Style>
  255.  
  256.     <Style TargetType="{x:Type Button}" x:Key="TunnelingChannelMarkupButton" BasedOn="{StaticResource ChannelMarkupButton}">
  257.         <Setter Property="Command" Value="{Binding Path=DataContext.JoinChannelCommand,
  258.                                  RelativeSource={RelativeSource Mode=FindAncestor,
  259.                                  AncestorType={x:Type ItemsControl}} }" />
  260.     </Style>
  261.  
  262.     <Style TargetType="{x:Type Button}" x:Key="ChannelInterfaceButton" BasedOn="{StaticResource {x:Type Button}}">
  263.         <Setter Property="Padding" Value="2,0"/>
  264.         <Setter Property="Command" Value="{Binding Path=DataContext.JoinChannelCommand,
  265.                    RelativeSource={RelativeSource Mode=FindAncestor,
  266.                    AncestorType={x:Type ItemsControl}} }"/>
  267.     </Style>
  268.  
  269.     <Style TargetType="{x:Type Button}" x:Key="ImageContentButton" BasedOn="{StaticResource {x:Type Button}}">
  270.         <Setter Property="Padding" Value="0"/>
  271.         <Setter Property="BorderThickness" Value="0"/>
  272.         <Setter Property="Margin" Value="2,0"/>
  273.         <Setter Property="Background" Value="{StaticResource BackgroundBrush}"/>
  274.         <Style.Triggers>
  275.             <Trigger Property="IsMouseOver" Value="True">
  276.                 <Setter Property="Foreground" Value="{StaticResource HighlightBrush}" />
  277.             </Trigger>
  278.             <Trigger Property="IsMouseOver" Value="False">
  279.                 <Setter Property="Foreground" Value="{StaticResource DepressedBrush}" />
  280.             </Trigger>
  281.             <Trigger Property="IsPressed" Value="True">
  282.                 <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}"/>
  283.             </Trigger>
  284.         </Style.Triggers>
  285.     </Style>
  286.  
  287.     <Style TargetType="ToggleButton">
  288.         <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  289.         <Setter Property="BorderThickness" Value="2" />
  290.         <Setter Property="Padding" Value="5" />
  291.         <Setter Property="Foreground" Value="{StaticResource DepressedBrush}" />
  292.         <Setter Property="Background" Value="Transparent" />
  293.         <Setter Property="Template">
  294.             <Setter.Value>
  295.                 <ControlTemplate TargetType="ToggleButton">
  296.                     <Border x:Name="Root"
  297.                            BorderThickness="{TemplateBinding Property=BorderThickness}"
  298.                            Padding="{TemplateBinding Property=Padding}"
  299.                            TextBlock.Foreground="{TemplateBinding Property=Foreground}"
  300.                            BorderBrush="{StaticResource DepressedBrush}"
  301.                            Background="{TemplateBinding Property=Background}"
  302.                            RenderTransformOrigin="0.5,0.5">
  303.                        
  304.                         <Border.RenderTransform>
  305.                             <ScaleTransform x:Name="Scale" ScaleX="1" ScaleY="1"/>
  306.                         </Border.RenderTransform>
  307.  
  308.                         <ContentPresenter x:Name="PART_ContentHost"
  309.                                          OverridesDefaultStyle="True"
  310.                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  311.                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  312.                     </Border>
  313.                     <ControlTemplate.Triggers>
  314.                         <Trigger Property="IsChecked" Value="True">
  315.                             <Setter Property="Background" Value="{StaticResource BrightBackgroundBrush}" />
  316.                             <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
  317.                         </Trigger>
  318.                        
  319.                         <Trigger Property="IsChecked" Value="False">
  320.                             <Setter Property="Foreground" Value="{StaticResource DepressedBrush}" />
  321.                             <Setter Property="BorderBrush" Value="{StaticResource DepressedBrush}" />
  322.                         </Trigger>
  323.                        
  324.                         <Trigger Property="IsPressed" Value="True">
  325.                             <Setter Property="Background" TargetName="Root"
  326.                                    Value="{StaticResource DepressedBrush}" />
  327.  
  328.                             <Trigger.EnterActions>
  329.                                 <BeginStoryboard>
  330.                                     <Storyboard>
  331.                                         <DoubleAnimation Storyboard.TargetName="Scale"
  332.                                                         Storyboard.TargetProperty="ScaleX"
  333.                                                         From="1"
  334.                                                         To="0.90" Duration="0:0:0.05">
  335.                                             <DoubleAnimation.EasingFunction>
  336.                                                 <CircleEase EasingMode="EaseOut" />
  337.                                             </DoubleAnimation.EasingFunction>
  338.                                         </DoubleAnimation>
  339.                                         <DoubleAnimation Storyboard.TargetName="Scale"
  340.                                                         From="1"
  341.                                                         Storyboard.TargetProperty="ScaleY"
  342.                                                         To="0.90" Duration="0:0:0.05">
  343.                                             <DoubleAnimation.EasingFunction>
  344.                                                 <CircleEase EasingMode="EaseOut" />
  345.                                             </DoubleAnimation.EasingFunction>
  346.                                         </DoubleAnimation>
  347.                                     </Storyboard>
  348.                                 </BeginStoryboard>
  349.                             </Trigger.EnterActions>
  350.                             <Trigger.ExitActions>
  351.                                 <BeginStoryboard>
  352.                                     <Storyboard>
  353.                                         <DoubleAnimation Storyboard.TargetName="Scale"
  354.                                                         Storyboard.TargetProperty="ScaleX"
  355.                                                         From="0.90"
  356.                                                         To="1" Duration="0:0:0.05">
  357.                                             <DoubleAnimation.EasingFunction>
  358.                                                 <CircleEase EasingMode="EaseIn" />
  359.                                             </DoubleAnimation.EasingFunction>
  360.                                         </DoubleAnimation>
  361.                                         <DoubleAnimation Storyboard.TargetName="Scale"
  362.                                                         From="0.90"
  363.                                                         Storyboard.TargetProperty="ScaleY"
  364.                                                         To="1" Duration="0:0:0.05">
  365.                                             <DoubleAnimation.EasingFunction>
  366.                                                 <CircleEase EasingMode="EaseIn" />
  367.                                             </DoubleAnimation.EasingFunction>
  368.                                         </DoubleAnimation>
  369.                                     </Storyboard>
  370.                                 </BeginStoryboard>
  371.                             </Trigger.ExitActions>
  372.                         </Trigger>
  373.                         <Trigger Property="IsFocused" Value="True">
  374.                             <Setter Property="BorderBrush" TargetName="Root"
  375.                                    Value="{StaticResource HighlightBrush}" />
  376.                         </Trigger>
  377.                         <Trigger Property="IsMouseOver" Value="True">
  378.                             <Setter Property="BorderBrush" TargetName="Root"
  379.                                    Value="{StaticResource HighlightBrush}" />
  380.                         </Trigger>
  381.                     </ControlTemplate.Triggers>
  382.                 </ControlTemplate>
  383.             </Setter.Value>
  384.         </Setter>
  385.     </Style>
  386.  
  387.     <Style x:Key="ImageContentToggleButton" TargetType="ToggleButton" BasedOn="{StaticResource {x:Type ToggleButton}}">
  388.         <Setter Property="Padding" Value="0"/>
  389.         <Setter Property="BorderThickness" Value="0"/>
  390.         <Setter Property="Margin" Value="2,0"/>
  391.         <Setter Property="Background" Value="{StaticResource BackgroundBrush}"/>
  392.         <Style.Triggers>
  393.             <Trigger Property="IsMouseOver" Value="True">
  394.                 <Setter Property="Foreground" Value="{StaticResource HighlightBrush}" />
  395.             </Trigger>
  396.             <Trigger Property="IsMouseOver" Value="False">
  397.                 <Setter Property="Foreground" Value="{StaticResource DepressedBrush}" />
  398.             </Trigger>
  399.             <Trigger Property="IsChecked" Value="True">
  400.                 <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}"/>
  401.             </Trigger>
  402.         </Style.Triggers>
  403.     </Style>
  404.  
  405.     <ControlTemplate x:Key="SimpleExpanderButton"
  406.                     TargetType="{x:Type ToggleButton}">
  407.         <Border x:Name="ExpanderButtonBorder"
  408.                Margin="{TemplateBinding Property=Margin}"
  409.                Background="{TemplateBinding Property=Background}"
  410.                BorderBrush="{TemplateBinding Property=BorderBrush}"
  411.                BorderThickness="2">
  412.             <Grid HorizontalAlignment="Left"
  413.                  Margin="5">
  414.                 <Grid.ColumnDefinitions>
  415.                     <ColumnDefinition Width="auto" />
  416.                     <ColumnDefinition Width="*" />
  417.                 </Grid.ColumnDefinitions>
  418.                
  419.                 <Rectangle Fill="Transparent"
  420.                           Grid.ColumnSpan="2" />
  421.                 <Path x:Name="Sign"
  422.                      Grid.Column="0"
  423.                      Data="M 0, 5 H 10 M 5, 0 V 10 Z"
  424.                      Stroke="{StaticResource HighlightBrush}"
  425.                      Width="10"
  426.                      Height="10"
  427.                      Margin="0,0,4,0"
  428.                      StrokeThickness="2"
  429.                      HorizontalAlignment="Center"
  430.                      VerticalAlignment="Center"
  431.                      RenderTransformOrigin="0.5,0.5">
  432.                     <Path.RenderTransform>
  433.                         <RotateTransform Angle="0" />
  434.                     </Path.RenderTransform>
  435.                 </Path>
  436.                 <ContentPresenter x:Name="HeaderContent"
  437.                                  Grid.Column="1"
  438.                                  ContentSource="Content"
  439.                                  TextBlock.Foreground="{StaticResource ForegroundBrush}"/>
  440.             </Grid>
  441.         </Border>
  442.         <ControlTemplate.Triggers>
  443.             <Trigger Property="IsChecked" Value="true">
  444.                 <Setter Property="Data" TargetName="Sign"
  445.                        Value="M 0, 5 H 10 Z" />
  446.                 <Setter Property="Stroke" Value="{StaticResource HighlightBrush}"
  447.                        TargetName="Sign" />
  448.             </Trigger>
  449.             <Trigger Property="IsMouseOver" Value="true">
  450.                 <Setter Property="Stroke" Value="{StaticResource ForegroundBrush}"
  451.                        TargetName="Sign" />
  452.             </Trigger>
  453.             <Trigger Property="IsPressed" Value="true">
  454.                 <Setter Property="StrokeThickness" Value="0" TargetName="Sign" />
  455.             </Trigger>
  456.         </ControlTemplate.Triggers>            
  457.     </ControlTemplate>
  458.    
  459.     <ControlTemplate x:Key="ThemedExpander" TargetType="{x:Type Expander}">
  460.         <DockPanel>
  461.             <ToggleButton x:Name="ExpanderButton"
  462.                          DockPanel.Dock="Top"
  463.                          Background="{TemplateBinding Property=Background}"
  464.                          BorderBrush="{TemplateBinding Property=BorderBrush}"
  465.                          Template="{StaticResource SimpleExpanderButton}"
  466.                          Content="{TemplateBinding Header}"
  467.                          IsChecked="{Binding Path=IsExpanded,
  468.                          RelativeSource={RelativeSource TemplatedParent}}"
  469.                          OverridesDefaultStyle="True"
  470.                          Padding="1"
  471.                          Margin="{TemplateBinding Property=Margin}">
  472.             </ToggleButton>
  473.            
  474.             <ContentPresenter x:Name="ExpanderContent"
  475.                              DockPanel.Dock="Bottom"
  476.                              TextBlock.Foreground="{StaticResource ForegroundBrush}"
  477.                              Visibility="Collapsed"
  478.                              Margin="0,0,0,5">
  479.                 <ContentPresenter.LayoutTransform>
  480.                     <ScaleTransform />
  481.                 </ContentPresenter.LayoutTransform>
  482.             </ContentPresenter>
  483.         </DockPanel>
  484.         <ControlTemplate.Triggers>
  485.             <Trigger Property="IsExpanded" Value="True">
  486.                 <Setter Property="Visibility"
  487.                        TargetName="ExpanderContent"
  488.                        Value="Visible"/>
  489.             </Trigger>
  490.         </ControlTemplate.Triggers>
  491.     </ControlTemplate>
  492.    
  493.     <Style TargetType="Expander">
  494.         <Setter Property="Template" Value="{StaticResource ThemedExpander}" />
  495.         <Setter Property="IsExpanded" Value="False" />
  496.     </Style>
  497.    
  498.     <DataTemplate x:Key="AvatarListBox">
  499.         <Border Background="Transparent" x:Name="root" Margin="5"
  500.                BorderBrush="Transparent" BorderThickness="2">
  501.             <StackPanel Margin="10, 2">
  502.                 <Image Height="50" Width="50" Visibility="Collapsed" />
  503.                 <TextBlock Text="{Binding}" HorizontalAlignment="Center" />
  504.             </StackPanel>
  505.         </Border>
  506.         <DataTemplate.Triggers>
  507.             <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor,
  508.                AncestorType={x:Type ListBoxItem}}, Path=IsSelected}" Value="True">
  509.                 <Setter Property="TextBlock.Foreground" Value="{StaticResource ForegroundBrush}" />
  510.                 <Setter TargetName="root" Property="BorderBrush" Value="{StaticResource HighlightBrush}" />
  511.                 <Setter TargetName="root" Property="Background" Value="{StaticResource LightBackgroundBrush}" />
  512.             </DataTrigger>
  513.             <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor,
  514.                AncestorType={x:Type ListBoxItem}}, Path=IsSelected}" Value="False">
  515.                 <Setter Property="TextBlock.Foreground" Value="{StaticResource DepressedBrush}" />
  516.                 <Setter Property="Effect">
  517.                     <Setter.Value>
  518.                         <BlurEffect Radius="1.5" />
  519.                     </Setter.Value>
  520.                 </Setter>
  521.             </DataTrigger>
  522.             <MultiDataTrigger>
  523.                 <MultiDataTrigger.Conditions>
  524.                     <Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor,
  525.                    AncestorType={x:Type ListBoxItem}}, Path=IsSelected}" Value="False" />
  526.                     <Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor,
  527.                    AncestorType={x:Type ListBox}}, Path=IsEnabled}" Value="False" />    
  528.                 </MultiDataTrigger.Conditions>
  529.                 <Setter Property="TextBlock.Foreground" Value="Transparent" />
  530.             </MultiDataTrigger>
  531.             <MultiDataTrigger>
  532.                 <MultiDataTrigger.Conditions>
  533.                     <Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor,
  534.                    AncestorType={x:Type ListBoxItem}}, Path=IsSelected}" Value="True" />
  535.                     <Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor,
  536.                    AncestorType={x:Type ListBox}}, Path=IsEnabled}" Value="False" />
  537.                 </MultiDataTrigger.Conditions>
  538.                 <Setter TargetName="root" Property="Background" Value="Transparent" />
  539.                 <Setter Property="TextBlock.Foreground" Value="{StaticResource ForegroundBrush}" />
  540.             </MultiDataTrigger>
  541.         </DataTemplate.Triggers>
  542.     </DataTemplate>
  543.  
  544.     <Style TargetType="ListBox">
  545.         <Style.Resources>
  546.             <!-- System color over-ride -->
  547.             <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"
  548.                             Color="Transparent" />
  549.             <!-- System color over-ride -->
  550.             <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}"
  551.                             Color="Transparent" />
  552.             <!-- System color over-ride -->
  553.             <SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}"
  554.                             Color="Transparent" />
  555.         </Style.Resources>
  556.         <Setter Property="ItemTemplate" Value="{StaticResource AvatarListBox}" />
  557.         <Setter Property="Background" Value="Transparent" />
  558.         <Setter Property="HorizontalContentAlignment" Value="Center" />
  559.         <Setter Property="BorderBrush" Value="Transparent" />
  560.         <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
  561.         <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
  562.         <Setter Property="ItemContainerStyle">
  563.             <Setter.Value>
  564.                 <Style TargetType="ListBoxItem">
  565.                     <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  566.                 </Style>
  567.             </Setter.Value>
  568.         </Setter>
  569.     </Style>
  570.  
  571.     <Style TargetType="ListBox" x:Key="ContentListBox">
  572.         <Style.Resources>
  573.             <!-- System color over-ride -->
  574.             <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"
  575.                             Color="Transparent" />
  576.             <!-- System color over-ride -->
  577.             <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}"
  578.                             Color="Transparent" />
  579.             <!-- System color over-ride -->
  580.             <SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}"
  581.                             Color="Transparent" />
  582.         </Style.Resources>
  583.        
  584.         <Setter Property="VirtualizingStackPanel.VirtualizationMode" Value="Recycling"/>
  585.         <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
  586.         <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
  587.         <Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="True"/>
  588.         <Setter Property="Margin" Value="0,5" />
  589.         <Setter Property="Background" Value="Transparent" />
  590.         <Setter Property="BorderBrush" Value="Transparent" />
  591.         <Setter Property="ItemContainerStyle">
  592.             <Setter.Value>
  593.                 <Style TargetType="ListBoxItem">
  594.                     <Setter Property="Padding" Value="0" />
  595.                     <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  596.                 </Style>
  597.             </Setter.Value>
  598.         </Setter>
  599.     </Style>
  600.    
  601.     <Storyboard x:Key="FadeInAnimation" >
  602.         <DoubleAnimation Storyboard.TargetProperty="Opacity"
  603.                         Duration="0:0:0.3"
  604.                         From="0"
  605.                         To="1">
  606.  
  607.             <DoubleAnimation.EasingFunction>
  608.                 <CircleEase EasingMode="EaseIn" />
  609.             </DoubleAnimation.EasingFunction>
  610.         </DoubleAnimation>
  611.     </Storyboard>
  612.  
  613.     <Storyboard x:Key="FadeOutAnimation" >
  614.         <DoubleAnimation Storyboard.TargetProperty="Opacity"
  615.                         Duration="0:0:0.3"
  616.                         From="1"
  617.                         To="0">
  618.  
  619.             <DoubleAnimation.EasingFunction>
  620.                 <CircleEase EasingMode="EaseOut" />
  621.             </DoubleAnimation.EasingFunction>
  622.         </DoubleAnimation>
  623.     </Storyboard>
  624.     <Style TargetType="ScrollViewer">
  625.         <Setter Property="CanContentScroll" Value="True" />
  626.         <Setter Property="VerticalScrollBarVisibility" Value="Auto" />
  627.     </Style>
  628.  
  629.    
  630.     <DataTemplate x:Key="ChannelUpdateTemplate">
  631.         <Grid>
  632.             <Grid.ColumnDefinitions>
  633.                 <ColumnDefinition />
  634.                 <ColumnDefinition Width="auto"/>
  635.             </Grid.ColumnDefinitions>
  636.             <TextBlock TextWrapping="Wrap"
  637.                       TextAlignment="Left">
  638.                 <InlineUIContainer BaselineAlignment="TextBottom">
  639.                     <Button Content="{Binding Path=ChannelTitle, Mode=OneWay}"
  640.                            Style="{StaticResource ChannelInterfaceButton}"
  641.                            CommandParameter="{Binding Path=ChannelID, Mode=OneWay}" />
  642.                 </InlineUIContainer>
  643.                 <Run Text="{Binding Path=Arguments, Mode=OneWay}"
  644.                     Foreground="{StaticResource ForegroundBrush}"/>
  645.             </TextBlock>
  646.            
  647.             <Button Content="X"
  648.                    Grid.Column="1"
  649.                    VerticalAlignment="Top"
  650.                    HorizontalAlignment="Right"
  651.                    Padding="2,0"
  652.                    Command="{Binding Path=DataContext.RemoveNotificationCommand,
  653.                    RelativeSource={RelativeSource Mode=FindAncestor,
  654.                    AncestorType={x:Type ItemsControl}} }"
  655.                    CommandParameter="{Binding}"/>
  656.         </Grid>
  657.     </DataTemplate>
  658.  
  659.     <Style TargetType="ItemsControl">
  660.         <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
  661.         <Setter Property="Focusable" Value="True" />
  662.         <Setter Property="ItemsPanel">
  663.             <Setter.Value>
  664.                 <ItemsPanelTemplate>
  665.                     <VirtualizingStackPanel IsItemsHost="True"
  666.                                            VirtualizationMode="Recycling"/>
  667.                 </ItemsPanelTemplate>
  668.             </Setter.Value>
  669.         </Setter>
  670.         <Setter Property="Template">
  671.             <Setter.Value>
  672.                 <ControlTemplate>
  673.                     <Border BorderThickness="{TemplateBinding Border.BorderThickness}"
  674.                            BorderBrush="{TemplateBinding Border.BorderBrush}"
  675.                            Background="{TemplateBinding Panel.Background}"
  676.                            SnapsToDevicePixels="True">
  677.                         <ScrollViewer Padding="{TemplateBinding Control.Padding}"
  678.                                      Focusable="False">
  679.                             <ItemsPresenter SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
  680.                                            Margin="0,0,5,0"/>
  681.                         </ScrollViewer>
  682.                     </Border>
  683.                 </ControlTemplate>
  684.             </Setter.Value>
  685.         </Setter>
  686.     </Style>
  687.  
  688.     <!-- Scollbar styles -->
  689.     <Style x:Key="ScrollBarLineButton" TargetType="{x:Type RepeatButton}">
  690.         <Setter Property="SnapsToDevicePixels" Value="True"/>
  691.         <Setter Property="OverridesDefaultStyle" Value="true"/>
  692.         <Setter Property="Focusable" Value="false"/>
  693.         <Setter Property="Template">
  694.             <Setter.Value>
  695.                 <ControlTemplate TargetType="{x:Type RepeatButton}">
  696.                     <Border Name="Border" Margin="1" Background="Transparent"
  697.                            BorderBrush="{StaticResource DepressedBrush}"
  698.                            CornerRadius="2" BorderThickness="1">
  699.                         <Path Name="Path" HorizontalAlignment="Center"
  700.                              VerticalAlignment="Center" Fill="{StaticResource ForegroundBrush}"
  701.                              Data="{Binding Path=Content,
  702.                              RelativeSource={RelativeSource TemplatedParent}}" />
  703.                     </Border>
  704.                     <ControlTemplate.Triggers>
  705.                         <Trigger Property="IsMouseOver" Value="true">
  706.                             <Setter TargetName="Path" Property="Fill"
  707.                                    Value="{StaticResource DepressedBrush}" />
  708.                             <Setter TargetName="Border" Property="BorderBrush"
  709.                                    Value="{StaticResource ForegroundBrush}" />
  710.                         </Trigger>
  711.                         <Trigger Property="IsPressed" Value="true">
  712.                             <Setter TargetName="Border" Property="Background"
  713.                                        Value="{StaticResource BrightBackgroundBrush}" />
  714.                         </Trigger>
  715.                     </ControlTemplate.Triggers>
  716.                 </ControlTemplate>
  717.             </Setter.Value>
  718.         </Setter>
  719.     </Style>
  720.     <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
  721.         <Setter Property="SnapsToDevicePixels" Value="True"/>
  722.         <Setter Property="OverridesDefaultStyle" Value="true"/>
  723.         <Setter Property="IsTabStop" Value="false"/>
  724.         <Setter Property="Focusable" Value="false"/>
  725.         <Setter Property="Template">
  726.             <Setter.Value>
  727.                 <ControlTemplate TargetType="{x:Type Thumb}">
  728.                     <Border Background="{TemplateBinding Background}"
  729.                            CornerRadius="2"
  730.                            BorderBrush="{TemplateBinding BorderBrush}"
  731.                            BorderThickness="2" Name="Border"/>
  732.                     <ControlTemplate.Triggers>
  733.                         <Trigger Property="IsMouseOver" Value="True">
  734.                             <Setter Property="BorderBrush" TargetName="Border"
  735.                                    Value="{StaticResource ForegroundBrush}" />
  736.                         </Trigger>
  737.                         <Trigger Property="IsDragging" Value="true">
  738.                             <Setter Property="Background" TargetName="Border"
  739.                                    Value="{StaticResource BrightBackgroundBrush}" />
  740.                         </Trigger>
  741.                     </ControlTemplate.Triggers>
  742.                 </ControlTemplate>
  743.             </Setter.Value>
  744.         </Setter>
  745.     </Style>
  746.     <ControlTemplate x:Key="VerticalScrollBar"
  747.            TargetType="{x:Type ScrollBar}">
  748.         <Grid >
  749.             <Grid.RowDefinitions>
  750.                 <RowDefinition MaxHeight="18"/>
  751.                 <RowDefinition Height="0.00001*"/>
  752.                 <RowDefinition MaxHeight="18"/>
  753.             </Grid.RowDefinitions>
  754.             <Border Grid.RowSpan="3" Background="Transparent" />
  755.             <RepeatButton Grid.Row="0" Style="{StaticResource ScrollBarLineButton}"
  756.                          Height="18" Command="ScrollBar.LineUpCommand"
  757.                          Content="M 0 4 L 8 4 L 4 0 Z" />
  758.             <Track Name="PART_Track" Grid.Row="1" IsDirectionReversed="True">
  759.                 <Track.Thumb>
  760.                     <Thumb Style="{StaticResource ScrollBarThumb}" Margin="0,1,0,1"
  761.                          Background="Transparent" BorderBrush="{StaticResource DepressedBrush}"/>
  762.                 </Track.Thumb>
  763.             </Track>
  764.             <RepeatButton Grid.Row="3" Style="{StaticResource ScrollBarLineButton}"
  765.                          Height="18" Command="ScrollBar.LineDownCommand"
  766.                          Content="M 0 0 L 4 4 L 8 0 Z"/>
  767.         </Grid>
  768.     </ControlTemplate>
  769.     <ControlTemplate x:Key="HorizontalScrollBar"
  770.            TargetType="{x:Type ScrollBar}">
  771.         <Grid >
  772.             <Grid.ColumnDefinitions>
  773.                 <ColumnDefinition MaxWidth="18"/>
  774.                 <ColumnDefinition Width="0.00001*"/>
  775.                 <ColumnDefinition MaxWidth="18"/>
  776.             </Grid.ColumnDefinitions>
  777.             <Border Grid.ColumnSpan="3" Background="Transparent" />
  778.              <RepeatButton Grid.Column="0" Style="{StaticResource ScrollBarLineButton}"
  779.                          Width="18" Command="ScrollBar.LineLeftCommand"
  780.                          Content="M 4 0 L 4 8 L 0 4 Z" />
  781.             <Track Name="PART_Track" Grid.Column="1" IsDirectionReversed="False">
  782.                 <Track.Thumb>
  783.                     <Thumb Style="{StaticResource ScrollBarThumb}" Margin="0,1,0,1"
  784.                          Background="Transparent" BorderBrush="{StaticResource DepressedBrush}"/>
  785.                 </Track.Thumb>
  786.             </Track>
  787.             <RepeatButton Grid.Column="3" Style="{StaticResource ScrollBarLineButton}"
  788.                          Width="18" Command="ScrollBar.LineRightCommand"
  789.                          Content="M 0 0 L 4 4 L 0 8 Z"/>
  790.         </Grid>
  791.     </ControlTemplate>
  792.     <Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
  793.         <Setter Property="SnapsToDevicePixels" Value="True"/>
  794.         <Setter Property="OverridesDefaultStyle" Value="true"/>
  795.         <Style.Triggers>
  796.             <Trigger Property="Orientation" Value="Horizontal">
  797.                 <Setter Property="Width" Value="Auto"/>
  798.                 <Setter Property="Height" Value="18" />
  799.                 <Setter Property="Template"
  800.                        Value="{StaticResource HorizontalScrollBar}" />
  801.             </Trigger>
  802.             <Trigger Property="Orientation" Value="Vertical">
  803.                 <Setter Property="Width" Value="18"/>
  804.                 <Setter Property="Height" Value="Auto" />
  805.                 <Setter Property="Template"
  806.                        Value="{StaticResource VerticalScrollBar}" />
  807.             </Trigger>
  808.         </Style.Triggers>
  809.     </Style>
  810. </ResourceDictionary>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement