PoshCode Logo PowerShell Code Repository

PresentationFrame.xaml by Joel Bennett 17 months ago
embed code: <script type="text/javascript" src="http://PoshCode.org/embed/2104"></script>download | new post

A required file for my PowerShell Presentation module

  1. <ResourceDictionary
  2.         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.         xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">
  5.         <!-- Resource dictionary entries should be defined here. -->
  6.         <LinearGradientBrush x:Key="NavigationWindowNavigationChromeBackground" EndPoint="0,1" StartPoint="0,0">
  7.                 <GradientStop Color="#FFFFFF" Offset="0"/>
  8.                 <GradientStop Color="#E3E8F4" Offset="0.5"/>
  9.                 <GradientStop Color="#E3E8F4" Offset="0.5"/>
  10.                 <GradientStop Color="#FFFFFF" Offset="1.0"/>
  11.         </LinearGradientBrush>
  12.         <Style x:Key="NavigationWindowMenu" TargetType="{x:Type Menu}">
  13.                 <Setter Property="ItemsPanel">
  14.                         <Setter.Value>
  15.                                 <ItemsPanelTemplate>
  16.                                         <DockPanel/>
  17.                                 </ItemsPanelTemplate>
  18.                         </Setter.Value>
  19.                 </Setter>
  20.                 <Setter Property="OverridesDefaultStyle" Value="true"/>
  21.                 <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
  22.                 <Setter Property="IsMainMenu" Value="false"/>
  23.                 <Setter Property="Template">
  24.                         <Setter.Value>
  25.                                 <ControlTemplate TargetType="{x:Type Menu}">
  26.                                         <ItemsPresenter/>
  27.                                 </ControlTemplate>
  28.                         </Setter.Value>
  29.                 </Setter>
  30.         </Style>
  31.         <Style x:Key="MenuScrollButton" BasedOn="{x:Null}" TargetType="{x:Type RepeatButton}">
  32.                 <Setter Property="ClickMode" Value="Hover"/>
  33.                 <Setter Property="MinWidth" Value="0"/>
  34.                 <Setter Property="MinHeight" Value="0"/>
  35.                 <Setter Property="Template">
  36.                         <Setter.Value>
  37.                                 <ControlTemplate TargetType="{x:Type RepeatButton}">
  38.                                         <DockPanel SnapsToDevicePixels="true" Background="Transparent">
  39.                                                 <Rectangle x:Name="R1" Fill="Transparent" Width="1" DockPanel.Dock="Right"/>
  40.                                                 <Rectangle x:Name="B1" Fill="Transparent" Height="1" DockPanel.Dock="Bottom"/>
  41.                                                 <Rectangle x:Name="L1" Fill="Transparent" Width="1" DockPanel.Dock="Left"/>
  42.                                                 <Rectangle x:Name="T1" Fill="Transparent" Height="1" DockPanel.Dock="Top"/>
  43.                                                 <ContentPresenter x:Name="ContentContainer" HorizontalAlignment="Center" Margin="2,2,2,2" VerticalAlignment="Center"/>
  44.                                         </DockPanel>
  45.                                         <ControlTemplate.Triggers>
  46.                                                 <Trigger Property="IsPressed" Value="true">
  47.                                                         <Setter Property="Fill" TargetName="R1" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
  48.                                                         <Setter Property="Fill" TargetName="B1" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
  49.                                                         <Setter Property="Fill" TargetName="L1" Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"/>
  50.                                                         <Setter Property="Fill" TargetName="T1" Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"/>
  51.                                                         <Setter Property="Margin" TargetName="ContentContainer" Value="3,3,1,1"/>
  52.                                                 </Trigger>
  53.                                         </ControlTemplate.Triggers>
  54.                                 </ControlTemplate>
  55.                         </Setter.Value>
  56.                 </Setter>
  57.         </Style>
  58.         <Geometry x:Key="UpArrow">M 0,4 L 3.5,0 L 7,4 Z</Geometry>
  59.         <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
  60.         <Geometry x:Key="DownArrow">M 0,0 L 3.5,4 L 7,0 Z</Geometry>
  61.         <Style x:Key="{ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}" BasedOn="{x:Null}" TargetType="{x:Type ScrollViewer}">
  62.                 <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
  63.                 <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
  64.                 <Setter Property="Template">
  65.                         <Setter.Value>
  66.                                 <ControlTemplate TargetType="{x:Type ScrollViewer}">
  67.                                         <Grid SnapsToDevicePixels="true">
  68.                                                 <Grid.ColumnDefinitions>
  69.                                                         <ColumnDefinition Width="*"/>
  70.                                                 </Grid.ColumnDefinitions>
  71.                                                 <Grid.RowDefinitions>
  72.                                                         <RowDefinition Height="Auto"/>
  73.                                                         <RowDefinition Height="*"/>
  74.                                                         <RowDefinition Height="Auto"/>
  75.                                                 </Grid.RowDefinitions>
  76.                                                 <Border Grid.Column="0" Grid.Row="1">
  77.                                                         <ScrollContentPresenter Margin="{TemplateBinding Padding}"/>
  78.                                                 </Border>
  79.                                                 <RepeatButton Style="{StaticResource MenuScrollButton}" Focusable="false" Grid.Column="0" Grid.Row="0" Command="{x:Static ScrollBar.LineUpCommand}" CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
  80.                                                         <RepeatButton.Visibility>
  81.                                                                 <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
  82.                                                                         <Binding Path="ComputedVerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}"/>
  83.                                                                         <Binding Path="VerticalOffset" RelativeSource="{RelativeSource TemplatedParent}"/>
  84.                                                                         <Binding Path="ExtentHeight" RelativeSource="{RelativeSource TemplatedParent}"/>
  85.                                                                         <Binding Path="ViewportHeight" RelativeSource="{RelativeSource TemplatedParent}"/>
  86.                                                                 </MultiBinding>
  87.                                                         </RepeatButton.Visibility>
  88.                                                         <Path Fill="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}" Data="{StaticResource UpArrow}"/>
  89.                                                 </RepeatButton>
  90.                                                 <RepeatButton Style="{StaticResource MenuScrollButton}" Focusable="false" Grid.Column="0" Grid.Row="2" Command="{x:Static ScrollBar.LineDownCommand}" CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
  91.                                                         <RepeatButton.Visibility>
  92.                                                                 <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
  93.                                                                         <Binding Path="ComputedVerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}"/>
  94.                                                                         <Binding Path="VerticalOffset" RelativeSource="{RelativeSource TemplatedParent}"/>
  95.                                                                         <Binding Path="ExtentHeight" RelativeSource="{RelativeSource TemplatedParent}"/>
  96.                                                                         <Binding Path="ViewportHeight" RelativeSource="{RelativeSource TemplatedParent}"/>
  97.                                                                 </MultiBinding>
  98.                                                         </RepeatButton.Visibility>
  99.                                                         <Path Fill="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}" Data="{StaticResource DownArrow}"/>
  100.                                                 </RepeatButton>
  101.                                         </Grid>
  102.                                 </ControlTemplate>
  103.                         </Setter.Value>
  104.                 </Setter>
  105.         </Style>
  106.         <LinearGradientBrush x:Key="NavigationWindowDownArrowFill" EndPoint="0,1" StartPoint="0,0">
  107.                 <LinearGradientBrush.GradientStops>
  108.                         <GradientStopCollection>
  109.                                 <GradientStop Color="#33B5DA" Offset="0"/>
  110.                                 <GradientStop Color="#335799" Offset="1"/>
  111.                         </GradientStopCollection>
  112.                 </LinearGradientBrush.GradientStops>
  113.         </LinearGradientBrush>
  114.         <Style x:Key="NavigationWindowMenuItem" TargetType="{x:Type MenuItem}">
  115.                 <Setter Property="OverridesDefaultStyle" Value="true"/>
  116.                 <Setter Property="Template">
  117.                         <Setter.Value>
  118.                                 <ControlTemplate TargetType="{x:Type MenuItem}">
  119.                                         <Grid>
  120.                                                 <Popup x:Name="PART_Popup" AllowsTransparency="true" IsOpen="{Binding (MenuItem.IsSubmenuOpen), RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" VerticalOffset="2" Focusable="false">
  121.                                                         <!-- <Microsoft_Windows_Themes:SystemDropShadowChrome x:Name="Shdw" Color="Transparent"> -->
  122.                                                                 <Border x:Name="SubMenuBorder" Background="{DynamicResource {x:Static SystemColors.MenuBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}" BorderThickness="1">
  123.                                                                         <ScrollViewer Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}" CanContentScroll="true">
  124.                                                                                 <ItemsPresenter Margin="2" KeyboardNavigation.DirectionalNavigation="Cycle" KeyboardNavigation.TabNavigation="Cycle"/>
  125.                                                                         </ScrollViewer>
  126.                                                                 </Border>
  127.                                                         <!-- </Microsoft_Windows_Themes:SystemDropShadowChrome> -->
  128.                                                 </Popup>
  129.                                                 <Grid x:Name="Panel" HorizontalAlignment="Right" Width="26" Background="Transparent">
  130.                                                         <Border x:Name="HighlightBorder" SnapsToDevicePixels="True" Visibility="Hidden" BorderBrush="#B0B5BACE" BorderThickness="1,1,1,1" CornerRadius="2">
  131.                                                                 <Border.Background>
  132.                                                                         <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
  133.                                                                                 <GradientStop Color="#20DDDDDD" Offset="0"/>
  134.                                                                                 <GradientStop Color="#80FFFFFF" Offset="1"/>
  135.                                                                         </LinearGradientBrush>
  136.                                                                 </Border.Background>
  137.                                                                 <Border BorderBrush="#A0FFFFFF" BorderThickness="1" CornerRadius="1.5"/>
  138.                                                         </Border>
  139.                                                         <Path x:Name="Arrow" Fill="{StaticResource NavigationWindowDownArrowFill}" Stroke="White" StrokeLineJoin="Round" StrokeThickness="1" HorizontalAlignment="Right" Margin="{TemplateBinding Padding}" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 0 0 L 4.5 5 L 9 0 Z"/>
  140.                                                 </Grid>
  141.                                         </Grid>
  142.                                         <ControlTemplate.Triggers>
  143.                                                 <Trigger Property="IsHighlighted" Value="true">
  144.                                                         <Setter Property="Visibility" TargetName="HighlightBorder" Value="Visible"/>
  145.                                                 </Trigger>
  146.                                                 <Trigger Property="IsEnabled" Value="false">
  147.                                                         <Setter Property="Fill" TargetName="Arrow" Value="#A5AABE"/>
  148.                                                 </Trigger>
  149.                                                 <!--
  150.                  <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
  151.                                                         <Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
  152.                                                         <Setter Property="SnapsToDevicePixels" TargetName="Shdw" Value="true"/>
  153.                                                         <Setter Property="Color" TargetName="Shdw" Value="#71000000"/>
  154.                                                 </Trigger>
  155.                  -->
  156.                                         </ControlTemplate.Triggers>
  157.                                 </ControlTemplate>
  158.                         </Setter.Value>
  159.                 </Setter>
  160.         </Style>
  161.         <SolidColorBrush x:Key="CurrentEntryBackground" Opacity="0.25" Color="{StaticResource {x:Static SystemColors.HighlightColorKey}}"/>
  162.         <Style x:Key="NavigationWindowNavigationButtonJournalEntryStyle" TargetType="{x:Type MenuItem}">
  163.                 <Setter Property="OverridesDefaultStyle" Value="true"/>
  164.                 <Setter Property="Header" Value="{Binding (JournalEntry.Name)}"/>
  165.                 <Setter Property="Command" Value="NavigationCommands.NavigateJournal"/>
  166.                 <Setter Property="CommandTarget" Value="{Binding TemplatedParent, RelativeSource={RelativeSource AncestorType={x:Type Menu}}}"/>
  167.                 <Setter Property="CommandParameter" Value="{Binding RelativeSource={RelativeSource Self}}"/>
  168.                 <Setter Property="JournalEntryUnifiedViewConverter.JournalEntryPosition" Value="{Binding (JournalEntryUnifiedViewConverter.JournalEntryPosition)}"/>
  169.                 <Setter Property="Template">
  170.                         <Setter.Value>
  171.                                 <ControlTemplate TargetType="{x:Type MenuItem}">
  172.                                         <Grid x:Name="Panel" SnapsToDevicePixels="true" Background="Transparent">
  173.                                                 <Path x:Name="Glyph" Stroke="{TemplateBinding Foreground}" StrokeEndLineCap="Triangle" StrokeStartLineCap="Triangle" StrokeThickness="2" HorizontalAlignment="Left" Margin="7,5" Width="10" Height="10" SnapsToDevicePixels="false"/>
  174.                                                 <ContentPresenter Margin="24,5,21,5" ContentSource="Header"/>
  175.                                         </Grid>
  176.                                         <ControlTemplate.Triggers>
  177.                                                 <Trigger Property="JournalEntryUnifiedViewConverter.JournalEntryPosition" Value="Current">
  178.                                                         <Setter Property="Background" TargetName="Panel" Value="{StaticResource CurrentEntryBackground}"/>
  179.                                                         <Setter Property="Data" TargetName="Glyph" Value="M 0,5 L 2.5,8 L 7,3 "/>
  180.                                                         <Setter Property="FlowDirection" TargetName="Glyph" Value="LeftToRight"/>
  181.                                                         <Setter Property="StrokeLineJoin" TargetName="Glyph" Value="Miter"/>
  182.                                                 </Trigger>
  183.                                                 <Trigger Property="IsHighlighted" Value="true">
  184.                                                         <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
  185.                                                         <Setter Property="Background" TargetName="Panel" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
  186.                                                 </Trigger>
  187.                                                 <MultiTrigger>
  188.                                                         <MultiTrigger.Conditions>
  189.                                                                 <Condition Property="IsHighlighted" Value="true"/>
  190.                                                                 <Condition Property="JournalEntryUnifiedViewConverter.JournalEntryPosition" Value="Forward"/>
  191.                                                         </MultiTrigger.Conditions>
  192.                                                         <Setter Property="Stroke" TargetName="Glyph" Value="White"/>
  193.                                                         <Setter Property="Data" TargetName="Glyph" Value="M 1,5 L 7,5 M 5,1 L 9,5 L 5,9"/>
  194.                                                 </MultiTrigger>
  195.                                                 <MultiTrigger>
  196.                                                         <MultiTrigger.Conditions>
  197.                                                                 <Condition Property="IsHighlighted" Value="true"/>
  198.                                                                 <Condition Property="JournalEntryUnifiedViewConverter.JournalEntryPosition" Value="Back"/>
  199.                                                         </MultiTrigger.Conditions>
  200.                                                         <Setter Property="Stroke" TargetName="Glyph" Value="White"/>
  201.                                                         <Setter Property="Data" TargetName="Glyph" Value="M 9,5 L 3,5 M 5,1 L 1,5 L 5,9"/>
  202.                                                 </MultiTrigger>
  203.                                         </ControlTemplate.Triggers>
  204.                                 </ControlTemplate>
  205.                         </Setter.Value>
  206.                 </Setter>
  207.         </Style>
  208.         <JournalEntryUnifiedViewConverter x:Key="JournalEntryUnifiedViewConverter"/>
  209.         <LinearGradientBrush x:Key="NavigationWindowNavigationButtonFillDisabled" EndPoint="0.5,1.0" StartPoint="0.5,0.0">
  210.                 <LinearGradientBrush.GradientStops>
  211.                         <GradientStopCollection>
  212.                                 <GradientStop Color="#FFFFFF" Offset="0"/>
  213.                                 <GradientStop Color="#EBEEF5" Offset="0.5"/>
  214.                                 <GradientStop Color="#D8DDEB" Offset="0.5"/>
  215.                                 <GradientStop Color="#DFE2F0" Offset="1.0"/>
  216.                         </GradientStopCollection>
  217.                 </LinearGradientBrush.GradientStops>
  218.         </LinearGradientBrush>
  219.         <LinearGradientBrush x:Key="NavigationWindowNavigationButtonFillHover" EndPoint="0.5,1.0" StartPoint="0.5,0.0">
  220.                 <LinearGradientBrush.GradientStops>
  221.                         <GradientStopCollection>
  222.                                 <GradientStop Color="#FFFFFF" Offset="0.0"/>
  223.                                 <GradientStop Color="#DFEDF9" Offset="0.1"/>
  224.                                 <GradientStop Color="#3086E1" Offset="0.47"/>
  225.                                 <GradientStop Color="#003B91" Offset="0.47"/>
  226.                                 <GradientStop Color="#1793EF" Offset="0.70"/>
  227.                                 <GradientStop Color="#5AD4FF" Offset="0.85"/>
  228.                                 <GradientStop Color="#BDFFFF" Offset="0.95"/>
  229.                                 <GradientStop Color="#FFFFFF" Offset="1.0"/>
  230.                         </GradientStopCollection>
  231.                 </LinearGradientBrush.GradientStops>
  232.         </LinearGradientBrush>
  233.         <LinearGradientBrush x:Key="NavigationWindowNavigationButtonFillPressed" EndPoint="0.5,1.0" StartPoint="0.5,0.0">
  234.                 <LinearGradientBrush.GradientStops>
  235.                         <GradientStopCollection>
  236.                                 <GradientStop Color="#C0D2F5" Offset="0.0"/>
  237.                                 <GradientStop Color="#5E7A9C" Offset="0.47"/>
  238.                                 <GradientStop Color="#00062D" Offset="0.47"/>
  239.                                 <GradientStop Color="#005F9F" Offset="0.70"/>
  240.                                 <GradientStop Color="#1FA4E2" Offset="0.85"/>
  241.                                 <GradientStop Color="#61DAFF" Offset="0.95"/>
  242.                                 <GradientStop Color="#48CFFF" Offset="1.0"/>
  243.                         </GradientStopCollection>
  244.                 </LinearGradientBrush.GradientStops>
  245.         </LinearGradientBrush>
  246.         <LinearGradientBrush x:Key="NavigationWindowNavigationButtonFillEnabled" EndPoint="0.5,1.0" StartPoint="0.5,0.0">
  247.                 <LinearGradientBrush.GradientStops>
  248.                         <GradientStopCollection>
  249.                                 <GradientStop Color="#FFFFFF" Offset="0.0"/>
  250.                                 <GradientStop Color="#CCD4E9" Offset="0.1"/>
  251.                                 <GradientStop Color="#4881D2" Offset="0.47"/>
  252.                                 <GradientStop Color="#001A5A" Offset="0.47"/>
  253.                                 <GradientStop Color="#007BD6" Offset="0.70"/>
  254.                                 <GradientStop Color="#54DAFF" Offset="0.85"/>
  255.                                 <GradientStop Color="#86FFFF" Offset="0.95"/>
  256.                                 <GradientStop Color="#FFFFFF" Offset="1.0"/>
  257.                         </GradientStopCollection>
  258.                 </LinearGradientBrush.GradientStops>
  259.         </LinearGradientBrush>
  260.         <LinearGradientBrush x:Key="NavigationWindowNavigationButtonStrokeEnabled" EndPoint="0,1" StartPoint="0,0">
  261.                 <LinearGradientBrush.GradientStops>
  262.                         <GradientStopCollection>
  263.                                 <GradientStop Color="#6C90C4" Offset="0"/>
  264.                                 <GradientStop Color="#315BB4" Offset="0.5"/>
  265.                                 <GradientStop Color="#002091" Offset="0.5"/>
  266.                                 <GradientStop Color="#08377C" Offset="1"/>
  267.                         </GradientStopCollection>
  268.                 </LinearGradientBrush.GradientStops>
  269.         </LinearGradientBrush>
  270.         <LinearGradientBrush x:Key="NavigationWindowNavigationArrowFill" EndPoint="0,1" StartPoint="0,0">
  271.                 <LinearGradientBrush.GradientStops>
  272.                         <GradientStopCollection>
  273.                                 <GradientStop Color="#FFFFFF" Offset="0.5"/>
  274.                                 <GradientStop Color="#EEEEEE" Offset="0.5"/>
  275.                                 <GradientStop Color="#B0B0B0" Offset="1"/>
  276.                         </GradientStopCollection>
  277.                 </LinearGradientBrush.GradientStops>
  278.         </LinearGradientBrush>
  279.         <LinearGradientBrush x:Key="NavigationWindowNavigationArrowStrokeEnabled" EndPoint="0,1" StartPoint="0,0">
  280.                 <GradientStop Color="#8AB1FB" Offset="0"/>
  281.                 <GradientStop Color="#002874" Offset="1"/>
  282.         </LinearGradientBrush>
  283.         <Style x:Key="NavigationWindowBackButtonStyle" TargetType="{x:Type Button}">
  284.                 <Setter Property="OverridesDefaultStyle" Value="true"/>
  285.                 <Setter Property="Command" Value="NavigationCommands.BrowseBack"/>
  286.                 <Setter Property="Focusable" Value="false"/>
  287.                 <Setter Property="Template">
  288.                         <Setter.Value>
  289.                                 <ControlTemplate TargetType="{x:Type Button}">
  290.                                         <Grid Width="24" Height="24" Background="Transparent">
  291.                                                 <Ellipse x:Name="Circle" Fill="{StaticResource NavigationWindowNavigationButtonFillEnabled}" Stroke="{StaticResource NavigationWindowNavigationButtonStrokeEnabled}" StrokeThickness="1"/>
  292.                                                 <Path x:Name="Arrow" Fill="{StaticResource NavigationWindowNavigationArrowFill}" Stroke="{StaticResource NavigationWindowNavigationArrowStrokeEnabled}" StrokeThickness="0.75" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M0.37,7.69 L5.74,14.20 A1.5,1.5,0,1,0,10.26,12.27 L8.42,10.42 14.90,10.39 A1.5,1.5,0,1,0,14.92,5.87 L8.44,5.90 10.31,4.03 A1.5,1.5,0,1,0,5.79,1.77 z"/>
  293.                                         </Grid>
  294.                                         <ControlTemplate.Triggers>
  295.                                                 <Trigger Property="IsEnabled" Value="false">
  296.                                                         <Setter Property="Fill" TargetName="Circle" Value="{StaticResource NavigationWindowNavigationButtonFillDisabled}"/>
  297.                                                         <Setter Property="Stroke" TargetName="Circle" Value="#B5BACE"/>
  298.                                                         <Setter Property="Stroke" TargetName="Arrow" Value="#B0B5BACE"/>
  299.                                                         <Setter Property="Fill" TargetName="Arrow" Value="#D0FFFFFF"/>
  300.                                                 </Trigger>
  301.                                                 <Trigger Property="IsMouseOver" Value="true">
  302.                                                         <Setter Property="Fill" TargetName="Circle" Value="{StaticResource NavigationWindowNavigationButtonFillHover}"/>
  303.                                                 </Trigger>
  304.                                                 <Trigger Property="IsPressed" Value="true">
  305.                                                         <Setter Property="Fill" TargetName="Circle" Value="{StaticResource NavigationWindowNavigationButtonFillPressed}"/>
  306.                                                 </Trigger>
  307.                                         </ControlTemplate.Triggers>
  308.                                 </ControlTemplate>
  309.                         </Setter.Value>
  310.                 </Setter>
  311.         </Style>
  312.         <Style x:Key="NavigationWindowForwardButtonStyle" TargetType="{x:Type Button}">
  313.                 <Setter Property="OverridesDefaultStyle" Value="true"/>
  314.                 <Setter Property="Command" Value="NavigationCommands.BrowseForward"/>
  315.                 <Setter Property="Focusable" Value="false"/>
  316.                 <Setter Property="Template">
  317.                         <Setter.Value>
  318.                                 <ControlTemplate TargetType="{x:Type Button}">
  319.                                         <Grid Width="24" Height="24" Background="Transparent">
  320.                                                 <Ellipse x:Name="Circle" Fill="{StaticResource NavigationWindowNavigationButtonFillEnabled}" Stroke="{StaticResource NavigationWindowNavigationButtonStrokeEnabled}" StrokeThickness="1" Grid.Column="0"/>
  321.                                                 <Path x:Name="Arrow" Fill="{StaticResource NavigationWindowNavigationArrowFill}" Stroke="{StaticResource NavigationWindowNavigationArrowStrokeEnabled}" StrokeThickness="0.75" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0" Grid.Column="0" Data="M0.37,7.69 L5.74,14.20 A1.5,1.5,0,1,0,10.26,12.27 L8.42,10.42 14.90,10.39 A1.5,1.5,0,1,0,14.92,5.87 L8.44,5.90 10.31,4.03 A1.5,1.5,0,1,0,5.79,1.77 z">
  322.                                                         <Path.RenderTransform>
  323.                                                                 <ScaleTransform ScaleX="-1"/>
  324.                                                         </Path.RenderTransform>
  325.                                                 </Path>
  326.                                         </Grid>
  327.                                         <ControlTemplate.Triggers>
  328.                                                 <Trigger Property="IsEnabled" Value="false">
  329.                                                         <Setter Property="Fill" TargetName="Circle" Value="{StaticResource NavigationWindowNavigationButtonFillDisabled}"/>
  330.                                                         <Setter Property="Stroke" TargetName="Circle" Value="#B5BACE"/>
  331.                                                         <Setter Property="Stroke" TargetName="Arrow" Value="#B0B5BACE"/>
  332.                                                         <Setter Property="Fill" TargetName="Arrow" Value="#D0FFFFFF"/>
  333.                                                 </Trigger>
  334.                                                 <Trigger Property="IsMouseOver" Value="true">
  335.                                                         <Setter Property="Fill" TargetName="Circle" Value="{StaticResource NavigationWindowNavigationButtonFillHover}"/>
  336.                                                 </Trigger>
  337.                                                 <Trigger Property="IsPressed" Value="true">
  338.                                                         <Setter Property="Fill" TargetName="Circle" Value="{StaticResource NavigationWindowNavigationButtonFillPressed}"/>
  339.                                                 </Trigger>
  340.                                         </ControlTemplate.Triggers>
  341.                                 </ControlTemplate>
  342.                         </Setter.Value>
  343.                 </Setter>
  344.         </Style>
  345.         <ControlTemplate x:Key="FrameNavChromeTemplateKey" TargetType="{x:Type Frame}">
  346.                 <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
  347.                         <DockPanel>
  348.                                 <Grid Height="22" Background="{StaticResource NavigationWindowNavigationChromeBackground}" DockPanel.Dock="Bottom">
  349.                                         <Grid.ColumnDefinitions>
  350.                                                 <ColumnDefinition Width="Auto"/>
  351.                                                 <ColumnDefinition Width="Auto"/>
  352.                                                 <ColumnDefinition Width="16"/>
  353.                                                 <ColumnDefinition Width="*"/>
  354.                                         </Grid.ColumnDefinitions>
  355.                                         <Menu x:Name="NavMenu" Margin="1,0,0,0" Style="{StaticResource NavigationWindowMenu}" VerticalAlignment="Center" Height="16" Grid.ColumnSpan="3">
  356.                                                 <MenuItem Style="{StaticResource NavigationWindowMenuItem}" Padding="0,2,4,0" ItemContainerStyle="{StaticResource NavigationWindowNavigationButtonJournalEntryStyle}" IsSubmenuOpen="{Binding (MenuItem.IsSubmenuOpen), Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
  357.                                                         <MenuItem.ItemsSource>
  358.                                                                 <MultiBinding Converter="{StaticResource JournalEntryUnifiedViewConverter}">
  359.                                                                         <Binding Path="BackStack" RelativeSource="{RelativeSource TemplatedParent}"/>
  360.                                                                         <Binding Path="ForwardStack" RelativeSource="{RelativeSource TemplatedParent}"/>
  361.                                                                 </MultiBinding>
  362.                                                         </MenuItem.ItemsSource>
  363.                                                 </MenuItem>
  364.                                         </Menu>
  365.                                         <Path StrokeThickness="1" HorizontalAlignment="Left" Margin="2,0,0,0" VerticalAlignment="Center" IsHitTestVisible="false" SnapsToDevicePixels="false" Grid.Column="0" Grid.ColumnSpan="3" Data="M22.5767,21.035 Q27,19.37 31.424,21.035 A12.5,12.5,0,0,0,53.5,13 A12.5,12.5,0,0,0,37.765,0.926 Q27,4.93 16.235,0.926 A12.5,12.5,0,0,0,0.5,13 A12.5,12.5,0,0,0,22.5767,21.035 z">
  366.                                                 <Path.LayoutTransform>
  367.                                                         <ScaleTransform ScaleX="0.667" ScaleY="0.667"/>
  368.                                                 </Path.LayoutTransform>
  369.                                                 <Path.Stroke>
  370.                                                         <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
  371.                                                                 <LinearGradientBrush.GradientStops>
  372.                                                                         <GradientStopCollection>
  373.                                                                                 <GradientStop Color="#FFB7C2E3" Offset="0.2"/>
  374.                                                                                 <GradientStop Color="#A0FFFFFF" Offset="0.9"/>
  375.                                                                         </GradientStopCollection>
  376.                                                                 </LinearGradientBrush.GradientStops>
  377.                                                         </LinearGradientBrush>
  378.                                                 </Path.Stroke>
  379.                                                 <Path.Fill>
  380.                                                         <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
  381.                                                                 <LinearGradientBrush.GradientStops>
  382.                                                                         <GradientStopCollection>
  383.                                                                                 <GradientStop Color="#A0C2CCE7" Offset="0"/>
  384.                                                                                 <GradientStop Color="#60FFFFFF" Offset="1"/>
  385.                                                                         </GradientStopCollection>
  386.                                                                 </LinearGradientBrush.GradientStops>
  387.                                                         </LinearGradientBrush>
  388.                                                 </Path.Fill>
  389.                                         </Path>
  390.                                         <Button Margin="3,0,1,0" Style="{StaticResource NavigationWindowBackButtonStyle}" Grid.Column="0">
  391.                                                 <Button.LayoutTransform>
  392.                                                         <ScaleTransform ScaleX="0.667" ScaleY="0.667"/>
  393.                                                 </Button.LayoutTransform>
  394.                                         </Button>
  395.                                         <Button Margin="1,0,0,0" Style="{StaticResource NavigationWindowForwardButtonStyle}" Grid.Column="1">
  396.                                                 <Button.LayoutTransform>
  397.                                                         <ScaleTransform ScaleX="0.667" ScaleY="0.667"/>
  398.                                                 </Button.LayoutTransform>
  399.                                         </Button>
  400.                                         <!--<TextBlock >-->
  401.                                         <TextBlock Grid.Column="3" FontWeight="Bold" Text="{Binding Content.Title, ElementName=PART_FrameCP, Mode=Default}"/>
  402.                                         <!--<TextBlock FontWeight="Bold" Text="{Binding BackStack, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Frame}}}" />
  403.                                         </TextBlock>-->
  404.                                 </Grid>
  405.                                 <ContentPresenter x:Name="PART_FrameCP"/>
  406.                         </DockPanel>
  407.                 </Border>
  408.                 <ControlTemplate.Triggers>
  409.                         <MultiTrigger>
  410.                                 <MultiTrigger.Conditions>
  411.                                         <Condition Property="CanGoForward" Value="false"/>
  412.                                         <Condition Property="CanGoBack" Value="false"/>
  413.                                 </MultiTrigger.Conditions>
  414.                                 <Setter Property="IsEnabled" TargetName="NavMenu" Value="false"/>
  415.                         </MultiTrigger>
  416.                 </ControlTemplate.Triggers>
  417.         </ControlTemplate>
  418.         <Style TargetType="{x:Type Frame}">
  419.                 <Setter Property="Template">
  420.                         <Setter.Value>
  421.                                 <ControlTemplate TargetType="{x:Type Frame}">
  422.                                         <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
  423.                                                 <ContentPresenter x:Name="PART_FrameCP"/>
  424.                                         </Border>
  425.                                 </ControlTemplate>
  426.                         </Setter.Value>
  427.                 </Setter>
  428.                 <Style.Triggers>
  429.                         <Trigger Property="NavigationUIVisibility" Value="Visible">
  430.                                 <Setter Property="Template" Value="{StaticResource FrameNavChromeTemplateKey}"/>
  431.                         </Trigger>
  432.                         <MultiTrigger>
  433.                                 <MultiTrigger.Conditions>
  434.                                         <Condition Property="JournalOwnership" Value="OwnsJournal"/>
  435.                                         <Condition Property="NavigationUIVisibility" Value="Automatic"/>
  436.                                 </MultiTrigger.Conditions>
  437.                                 <Setter Property="Template" Value="{StaticResource FrameNavChromeTemplateKey}"/>
  438.                         </MultiTrigger>
  439.                 </Style.Triggers>
  440.         </Style>
  441. </ResourceDictionary>

Submit a correction or amendment below (
click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:


Remember me