Advertisement
Guest User

Untitled

a guest
Feb 8th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 16.43 KB | None | 0 0
  1.        <Color x:Key="WindowColor">#FFE8EDF9</Color>
  2.         <Color x:Key="ContentAreaColorLight">#FF122b57</Color>
  3.         <Color x:Key="ContentAreaColorDark">#FF15336B</Color>
  4.  
  5.         <Color x:Key="DisabledControlLightColor">#FFE8EDF9</Color>
  6.         <Color x:Key="DisabledControlDarkColor">#FF193b76</Color>
  7.         <Color x:Key="DisabledForegroundColor">#FF888888</Color>
  8.  
  9.         <Color x:Key="SelectedBackgroundColor">#FF173871</Color>
  10.         <Color x:Key="SelectedUnfocusedColor">#FF15336b</Color>
  11.  
  12.         <Color x:Key="ControlLightColor">#FF122b57</Color>
  13.         <Color x:Key="ControlDarkColor">#FF15336b</Color>
  14.  
  15.         <Color x:Key="ControlMouseOverColor">#FF122B57</Color>
  16.         <Color x:Key="ControlPressedColor">#FF15336B</Color>
  17.  
  18.  
  19.         <Color x:Key="GlyphColor">#FFF</Color>
  20.         <Color x:Key="GlyphMouseOver">sc#1, 0.004391443, 0.002428215, 0.242281124</Color>
  21.  
  22.         <!--Border colors-->
  23.         <Color x:Key="BorderLightColor">#FF1960a9</Color>
  24.         <Color x:Key="BorderMediumColor">#FF1960a9</Color>
  25.         <Color x:Key="BorderDarkColor">#FF1960a9</Color>
  26.  
  27.         <Color x:Key="PressedBorderLightColor">#FF1960a9</Color>
  28.         <Color x:Key="PressedBorderDarkColor">#FF1960a9</Color>
  29.  
  30.         <Color x:Key="DisabledBorderLightColor">#FF1960a9</Color>
  31.         <Color x:Key="DisabledBorderDarkColor">#FF1960a9</Color>
  32.  
  33.         <Color x:Key="DefaultBorderBrushDarkColor">#FF1960a9</Color>
  34.  
  35.         <!--Control-specific resources.-->
  36.         <Color x:Key="HeaderTopColor">#FFC5CBF9</Color>
  37.         <Color x:Key="DatagridCurrentCellBorderColor">Black</Color>
  38.         <Color x:Key="SliderTrackDarkColor">#FFC5CBF9</Color>
  39.  
  40.         <Color x:Key="NavButtonFrameColor">#FF3843C4</Color>
  41.  
  42.         <LinearGradientBrush x:Key="MenuPopupBrush" EndPoint="0.5,1" StartPoint="0.5,0">
  43.             <GradientStop Color="{DynamicResource ControlLightColor}" Offset="0" />
  44.             <GradientStop Color="{DynamicResource ControlDarkColor}" Offset="1" />
  45.         </LinearGradientBrush>
  46.  
  47.         <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
  48.             <Grid>
  49.                 <Grid.ColumnDefinitions>
  50.                     <ColumnDefinition />
  51.                     <ColumnDefinition Width="30" />
  52.                 </Grid.ColumnDefinitions>
  53.                 <VisualStateManager.VisualStateGroups>
  54.                     <VisualStateGroup x:Name="CommonStates">
  55.                         <VisualState x:Name="Normal" />
  56.                         <VisualState x:Name="MouseOver"/>
  57.                         <VisualState x:Name="Pressed"/>
  58.                         <VisualState x:Name="Disabled">
  59.                             <Storyboard>
  60.                                 <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).
  61.                (GradientBrush.GradientStops)[1].(GradientStop.Color)"
  62.                                          Storyboard.TargetName="Border">
  63.                                     <EasingColorKeyFrame KeyTime="0"
  64.                                   Value="{StaticResource DisabledControlDarkColor}" />
  65.                                 </ColorAnimationUsingKeyFrames>
  66.                                 <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="Arrow">
  67.                                     <EasingColorKeyFrame KeyTime="0" Value="{StaticResource DisabledForegroundColor}" />
  68.                                 </ColorAnimationUsingKeyFrames>
  69.                                 <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
  70.                                     <EasingColorKeyFrame KeyTime="0" Value="{StaticResource DisabledBorderDarkColor}" />
  71.                                 </ColorAnimationUsingKeyFrames>
  72.                             </Storyboard>
  73.                         </VisualState>
  74.                     </VisualStateGroup>
  75.                 </VisualStateManager.VisualStateGroups>
  76.                 <Border x:Name="Border" Grid.ColumnSpan="2" CornerRadius="0" BorderThickness="1">
  77.                     <Border.BorderBrush>
  78.                         <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
  79.                             <GradientStop Color="{DynamicResource BorderLightColor}" Offset="0" />
  80.                             <GradientStop Color="{DynamicResource BorderDarkColor}" Offset="1" />
  81.                         </LinearGradientBrush>
  82.                     </Border.BorderBrush>
  83.                     <Border.Background>
  84.                         <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  85.                             <LinearGradientBrush.GradientStops>
  86.                                 <GradientStopCollection>
  87.                                     <GradientStop Color="{DynamicResource ControlLightColor}" />
  88.                                     <GradientStop Color="{DynamicResource ControlDarkColor}" Offset="1.0" />
  89.                                 </GradientStopCollection>
  90.                             </LinearGradientBrush.GradientStops>
  91.                         </LinearGradientBrush>
  92.  
  93.                     </Border.Background>
  94.                 </Border>
  95.                 <Border Grid.Column="0" CornerRadius="0" Margin="1" >
  96.                     <Border.Background>
  97.                         <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  98.                             <LinearGradientBrush.GradientStops>
  99.                                 <GradientStopCollection>
  100.                                     <GradientStop Color="{DynamicResource ControlLightColor}" />
  101.                                     <GradientStop Color="{DynamicResource ControlDarkColor}" Offset="1.0" />
  102.                                 </GradientStopCollection>
  103.                             </LinearGradientBrush.GradientStops>
  104.                         </LinearGradientBrush>
  105.                     </Border.Background>
  106.                 </Border>
  107.                 <Path x:Name="Arrow" Margin="0,5,7,5" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 0 0 L 4 4 L 8 0 Z" >
  108.                     <Path.Fill>
  109.                         <SolidColorBrush Color="{DynamicResource GlyphColor}"/>
  110.                     </Path.Fill>
  111.                 </Path>
  112.             </Grid>
  113.         </ControlTemplate>
  114.  
  115.         <ControlTemplate x:Key="ComboBoxTextBox" TargetType="{x:Type TextBox}">
  116.             <Border x:Name="PART_ContentHost" Focusable="False" Background="{TemplateBinding Background}" />
  117.         </ControlTemplate>
  118.  
  119.         <Style x:Key="{x:Type ComboBox}" TargetType="{x:Type ComboBox}">
  120.             <Setter Property="SnapsToDevicePixels" Value="true" />
  121.             <Setter Property="OverridesDefaultStyle" Value="true" />
  122.             <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
  123.             <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
  124.             <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
  125.             <Setter Property="MinWidth" Value="262" />
  126.             <Setter Property="MinHeight" Value="30" />
  127.             <Setter Property="MaxWidth" Value="262" />
  128.             <Setter Property="MaxHeight" Value="30" />
  129.             <Setter Property="VerticalContentAlignment" Value="Center"/>
  130.             <Setter Property="Padding" Value="5,15,0,0"/>
  131.             <Setter Property="Template">
  132.                 <Setter.Value>
  133.                     <ControlTemplate TargetType="{x:Type ComboBox}">
  134.                         <Grid>
  135.                             <VisualStateManager.VisualStateGroups>
  136.                                 <VisualStateGroup x:Name="CommonStates">
  137.                                     <VisualState x:Name="Normal" />
  138.                                     <VisualState x:Name="MouseOver" />
  139.                                     <VisualState x:Name="Disabled">
  140.                                         <Storyboard>
  141.                                             <ColorAnimationUsingKeyFrames Storyboard.TargetName="PART_EditableTextBox" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)">
  142.                                                 <EasingColorKeyFrame KeyTime="0" Value="{StaticResource DisabledForegroundColor}" />
  143.                                             </ColorAnimationUsingKeyFrames>
  144.                                         </Storyboard>
  145.                                     </VisualState>
  146.                                 </VisualStateGroup>
  147.                                 <VisualStateGroup x:Name="EditStates">
  148.                                     <VisualState x:Name="Editable">
  149.                                         <Storyboard>
  150.                                             <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PART_EditableTextBox">
  151.                                                 <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
  152.                                             </ObjectAnimationUsingKeyFrames>
  153.                                             <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ContentSite">
  154.                                                 <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}" />
  155.                                             </ObjectAnimationUsingKeyFrames>
  156.                                         </Storyboard>
  157.                                     </VisualState>
  158.                                     <VisualState x:Name="Uneditable" />
  159.                                 </VisualStateGroup>
  160.                             </VisualStateManager.VisualStateGroups>
  161.                             <ToggleButton x:Name="ToggleButton" Template="{StaticResource ComboBoxToggleButton}" Grid.Column="2" Focusable="false" ClickMode="Press" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay,  RelativeSource={RelativeSource TemplatedParent}}"/>
  162.                             <ContentPresenter x:Name="ContentSite"
  163.                                IsHitTestVisible="False"
  164.                                Content="{TemplateBinding SelectionBoxItem}"
  165.                                ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
  166.                                ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
  167.                                Margin="3,3,23,3"
  168.                                VerticalAlignment="Stretch"
  169.                                HorizontalAlignment="Left">
  170.                             </ContentPresenter>
  171.                             <TextBox x:Name="PART_EditableTextBox"
  172.                                Style="{x:Null}"
  173.                                Template="{StaticResource ComboBoxTextBox}"
  174.                                HorizontalAlignment="Left"
  175.                                VerticalAlignment="Bottom"
  176.                                Margin="3,3,23,3"
  177.                                Focusable="True"
  178.                                Background="Transparent"
  179.                                Visibility="Hidden"
  180.                           IsReadOnly="{TemplateBinding IsReadOnly}" />
  181.                            <Popup x:Name="Popup"
  182.                                Placement="Bottom"
  183.                                IsOpen="{TemplateBinding IsDropDownOpen}"
  184.                                AllowsTransparency="True"
  185.                                Focusable="False"
  186.                           PopupAnimation="Slide">
  187.                                 <Grid x:Name="DropDown" SnapsToDevicePixels="True" MinWidth="{TemplateBinding ActualWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
  188.                                     <Border x:Name="DropDownBorder" BorderThickness="1">
  189.                                         <Border.BorderBrush>
  190.                                             <SolidColorBrush Color="{DynamicResource BorderMediumColor}" />
  191.                                         </Border.BorderBrush>
  192.                                         <Border.Background>
  193.                                             <SolidColorBrush Color="{DynamicResource ControlLightColor}" />
  194.                                         </Border.Background>
  195.                                     </Border>
  196.                                     <ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True">
  197.                                         <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
  198.                                     </ScrollViewer>
  199.                                 </Grid>
  200.                             </Popup>
  201.                         </Grid>
  202.                         <ControlTemplate.Triggers>
  203.                             <Trigger Property="HasItems" Value="false">
  204.                                 <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
  205.                             </Trigger>
  206.                             <Trigger Property="IsGrouping" Value="true">
  207.                                 <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
  208.                             </Trigger>
  209.                             <Trigger SourceName="Popup" Property="AllowsTransparency" Value="true">
  210.                                 <Setter TargetName="DropDownBorder" Property="CornerRadius" Value="0" />
  211.                                 <Setter TargetName="DropDownBorder" Property="Margin" Value="0,2,0,0"/>
  212.                             </Trigger>
  213.                         </ControlTemplate.Triggers>
  214.                     </ControlTemplate>
  215.                 </Setter.Value>
  216.             </Setter>
  217.         </Style>
  218.  
  219.         <Style x:Key="{x:Type ComboBoxItem}" TargetType="{x:Type ComboBoxItem}">
  220.             <Setter Property="SnapsToDevicePixels" Value="true" />
  221.             <Setter Property="OverridesDefaultStyle" Value="true" />
  222.             <Setter Property="Padding" Value="15,0,0,0"/>
  223.             <Setter Property="Template">
  224.                 <Setter.Value>
  225.                     <ControlTemplate TargetType="{x:Type ComboBoxItem}">
  226.                         <Border x:Name="Border" Padding="2" SnapsToDevicePixels="true" Background="Transparent">
  227.                             <VisualStateManager.VisualStateGroups>
  228.                                 <VisualStateGroup x:Name="SelectionStates">
  229.                                     <VisualState x:Name="Unselected" />
  230.                                     <VisualState x:Name="MouseOver">
  231.                                         <Storyboard>
  232.                                             <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
  233.                                                 <EasingColorKeyFrame KeyTime="0" Value="#FFF" />
  234.                                             </ColorAnimationUsingKeyFrames>
  235.                                         </Storyboard>
  236.                                     </VisualState>
  237.                                     <VisualState x:Name="Selected">
  238.                                         <Storyboard>
  239.                                             <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
  240.                                                 <EasingColorKeyFrame KeyTime="0" Value="{StaticResource SelectedBackgroundColor}" />
  241.                                             </ColorAnimationUsingKeyFrames>
  242.                                         </Storyboard>
  243.                                     </VisualState>
  244.                                     <VisualState x:Name="SelectedUnfocused">
  245.                                         <Storyboard>
  246.                                             <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
  247.                                                 <EasingColorKeyFrame KeyTime="0" Value="{StaticResource SelectedUnfocusedColor}" />
  248.                                             </ColorAnimationUsingKeyFrames>
  249.                                         </Storyboard>
  250.                                     </VisualState>
  251.                                 </VisualStateGroup>
  252.                             </VisualStateManager.VisualStateGroups>
  253.                             <ContentPresenter />
  254.                         </Border>
  255.                     </ControlTemplate>
  256.                 </Setter.Value>
  257.             </Setter>
  258.         </Style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement