@ -51,7 +51,7 @@
HorizontalAlignment="Right" />
HorizontalAlignment="Right" />
</Panel>
</Panel>
<Panel Name="ContentRoot">
<Panel Name="ContentRoot" Grid.Column="1" >
<ContentPresenter x:Name="PART_ContentPresenter"
<ContentPresenter x:Name="PART_ContentPresenter"
Content="{TemplateBinding Content}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
ContentTemplate="{TemplateBinding ContentTemplate}" />
@ -135,11 +135,11 @@
Width="1" HorizontalAlignment="Left" />
Width="1" HorizontalAlignment="Left" />
</Panel>
</Panel>
<Panel Name="ContentRoot">
<Panel Name="ContentRoot" Grid.Column="0" >
<ContentPresenter x:Name="PART_ContentPresenter"
<ContentPresenter x:Name="PART_ContentPresenter"
Content="{TemplateBinding Content}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
ContentTemplate="{TemplateBinding ContentTemplate}" />
<Rectangle Name="LightDismissLayer" IsVisible="False"/>
<Rectangle Name="LightDismissLayer" Fill="Transparent" IsVisible="False"/>
</Panel>
</Panel>
</Grid>
</Grid>
@ -195,48 +195,254 @@
</Style>
</Style>
</Style>
</Style>
<Style Selector="^:open">
<!-- TOP placement -->
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<Style Selector="^:top">
<Setter Property="Transitions">
<Setter Property="Template">
<Transitions>
<ControlTemplate>
<DoubleTransition Property="Width"
<Grid Name="Container" Background="{TemplateBinding Background}">
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}"
<Grid.RowDefinitions>
Easing="{StaticResource SplitViewPaneAnimationEasing}" />
<RowDefinition Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneRowGridLength}"/>
</Transitions>
<RowDefinition Height="*"/>
</Setter>
</Grid.RowDefinitions>
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
</Style>
<Panel Name="PART_PaneRoot"
<Style Selector="^ /template/ Rectangle#LightDismissLayer">
Background="{TemplateBinding PaneBackground}"
<Setter Property="Transitions">
ClipToBounds="True"
<Transitions>
VerticalAlignment="Top"
<DoubleTransition Property="Opacity"
ZIndex="100">
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}"
<ContentPresenter x:Name="PART_PanePresenter"
Easing="{StaticResource SplitViewPaneAnimationEasing}" />
Content="{TemplateBinding Pane}"
</Transitions>
ContentTemplate="{TemplateBinding PaneTemplate}" />
</Setter>
<Rectangle Name="HCPaneBorder"
<Setter Property="Opacity" Value="1.0"/>
Fill="{DynamicResource SystemControlForegroundTransparentBrush}"
Height="1"
VerticalAlignment="Bottom" />
</Panel>
<Panel Name="ContentRoot" Grid.Row="1">
<ContentPresenter x:Name="PART_ContentPresenter"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
<Rectangle Name="LightDismissLayer"
Fill="Transparent"
IsVisible="False"/>
</Panel>
</Grid>
</ControlTemplate>
</Setter>
<Style Selector="^:overlay">
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneHeight}" />
<Setter Property="Grid.RowSpan" Value="1"/>
<Setter Property="Grid.Row" Value="0"/>
</Style>
<Style Selector="^ /template/ Panel#ContentRoot">
<Setter Property="Grid.Row" Value="1"/>
<Setter Property="Grid.RowSpan" Value="2"/>
</Style>
</Style>
<Style Selector="^:compactinline">
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<Setter Property="Grid.RowSpan" Value="1"/>
<Setter Property="Grid.Row" Value="0"/>
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneHeight}" />
</Style>
<Style Selector="^ /template/ Panel#ContentRoot">
<Setter Property="Grid.Row" Value="1"/>
<Setter Property="Grid.RowSpan" Value="1"/>
</Style>
</Style>
<Style Selector="^:compactoverlay">
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<Setter Property="Grid.RowSpan" Value="1"/>
<Setter Property="Grid.Row" Value="0"/>
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneHeight}" />
</Style>
<Style Selector="^ /template/ Panel#ContentRoot">
<Setter Property="Grid.Row" Value="1"/>
<Setter Property="Grid.RowSpan" Value="1"/>
</Style>
</Style>
<Style Selector="^:inline">
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<Setter Property="Grid.RowSpan" Value="1"/>
<Setter Property="Grid.Row" Value="0"/>
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneHeight}" />
</Style>
<Style Selector="^ /template/ Panel#ContentRoot">
<Setter Property="Grid.Row" Value="1"/>
<Setter Property="Grid.RowSpan" Value="1"/>
</Style>
</Style>
</Style>
</Style>
</Style>
<Style Selector="^:closed">
<!-- BOTTOM placement -->
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<Style Selector="^:bottom">
<Setter Property="Transitions">
<Setter Property="Template">
<Transitions>
<ControlTemplate>
<DoubleTransition Property="Width" Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" Easing="{StaticResource SplitViewPaneAnimationEasing}" />
<Grid Name="Container" Background="{TemplateBinding Background}">
</Transitions>
<Grid.RowDefinitions>
</Setter>
<RowDefinition Height="*"/>
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
<RowDefinition Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneRowGridLength}"/>
</Style>
</Grid.RowDefinitions>
<Style Selector="^ /template/ Rectangle#LightDismissLayer">
<Setter Property="Transitions">
<Panel Name="PART_PaneRoot" Background="{TemplateBinding PaneBackground}"
<Transitions>
ClipToBounds="True"
<DoubleTransition Property="Opacity" Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" Easing="{StaticResource SplitViewPaneAnimationEasing}" />
VerticalAlignment="Bottom"
</Transitions>
ZIndex="100">
</Setter>
<ContentPresenter x:Name="PART_PanePresenter"
<Setter Property="Opacity" Value="0.0"/>
Content="{TemplateBinding Pane}"
ContentTemplate="{TemplateBinding PaneTemplate}"/>
<Rectangle Name="HCPaneBorder"
Fill="{DynamicResource SystemControlForegroundTransparentBrush}"
Height="1" VerticalAlignment="Top" />
</Panel>
<Panel Name="ContentRoot" Grid.Row="0">
<ContentPresenter x:Name="PART_ContentPresenter"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
<Rectangle Name="LightDismissLayer" Fill="Transparent" IsVisible="False"/>
</Panel>
</Grid>
</ControlTemplate>
</Setter>
<Style Selector="^:overlay">
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneHeight}" />
<Setter Property="Grid.RowSpan" Value="2"/>
<Setter Property="Grid.Row" Value="1"/>
</Style>
<Style Selector="^ /template/ Panel#ContentRoot">
<Setter Property="Grid.Row" Value="0"/>
<Setter Property="Grid.RowSpan" Value="2"/>
</Style>
</Style>
<Style Selector="^:compactinline">
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<Setter Property="Grid.RowSpan" Value="1"/>
<Setter Property="Grid.Row" Value="1"/>
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneHeight}" />
</Style>
<Style Selector="^ /template/ Panel#ContentRoot">
<Setter Property="Grid.Row" Value="0"/>
<Setter Property="Grid.RowSpan" Value="1"/>
</Style>
</Style>
<Style Selector="^:compactoverlay">
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<Setter Property="Grid.RowSpan" Value="2"/>
<Setter Property="Grid.Row" Value="1"/>
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneHeight}" />
</Style>
<Style Selector="^ /template/ Panel#ContentRoot">
<Setter Property="Grid.Row" Value="0"/>
<Setter Property="Grid.RowSpan" Value="1"/>
</Style>
</Style>
<Style Selector="^:inline">
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<Setter Property="Grid.RowSpan" Value="1"/>
<Setter Property="Grid.Row" Value="1"/>
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneHeight}" />
</Style>
<Style Selector="^ /template/ Panel#ContentRoot">
<Setter Property="Grid.Row" Value="0"/>
<Setter Property="Grid.RowSpan" Value="1"/>
</Style>
</Style>
</Style>
</Style>
</Style>
<!-- Placement-specific open/closed transitions for horizontal panes (left/right) -->
<Style Selector="^:left:open /template/ Panel#PART_PaneRoot">
<Setter Property="Transitions">
<Transitions>
<DoubleTransition Property="Width"
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}"
Easing="{StaticResource SplitViewPaneAnimationEasing}" />
</Transitions>
</Setter>
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
</Style>
<Style Selector="^:right:open /template/ Panel#PART_PaneRoot">
<Setter Property="Transitions">
<Transitions>
<DoubleTransition Property="Width"
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}"
Easing="{StaticResource SplitViewPaneAnimationEasing}" />
</Transitions>
</Setter>
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
</Style>
<Style Selector="^:left:closed /template/ Panel#PART_PaneRoot">
<Setter Property="Transitions">
<Transitions>
<DoubleTransition Property="Width" Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" Easing="{StaticResource SplitViewPaneAnimationEasing}" />
</Transitions>
</Setter>
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
</Style>
<Style Selector="^:right:closed /template/ Panel#PART_PaneRoot">
<Setter Property="Transitions">
<Transitions>
<DoubleTransition Property="Width" Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" Easing="{StaticResource SplitViewPaneAnimationEasing}" />
</Transitions>
</Setter>
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
</Style>
<!-- Placement-specific open/closed transitions for vertical panes (top/bottom) -->
<Style Selector="^:top:open /template/ Panel#PART_PaneRoot">
<Setter Property="Transitions">
<Transitions>
<DoubleTransition Property="Height"
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}"
Easing="{StaticResource SplitViewPaneAnimationEasing}" />
</Transitions>
</Setter>
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
</Style>
<Style Selector="^:bottom:open /template/ Panel#PART_PaneRoot">
<Setter Property="Transitions">
<Transitions>
<DoubleTransition Property="Height"
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}"
Easing="{StaticResource SplitViewPaneAnimationEasing}" />
</Transitions>
</Setter>
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
</Style>
<Style Selector="^:top:closed /template/ Panel#PART_PaneRoot">
<Setter Property="Transitions">
<Transitions>
<DoubleTransition Property="Height" Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" Easing="{StaticResource SplitViewPaneAnimationEasing}" />
</Transitions>
</Setter>
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneHeight}" />
</Style>
<Style Selector="^:bottom:closed /template/ Panel#PART_PaneRoot">
<Setter Property="Transitions">
<Transitions>
<DoubleTransition Property="Height" Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" Easing="{StaticResource SplitViewPaneAnimationEasing}" />
</Transitions>
</Setter>
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneHeight}" />
</Style>
<Style Selector="^:lightDismiss /template/ Rectangle#LightDismissLayer">
<Style Selector="^:lightDismiss /template/ Rectangle#LightDismissLayer">
<Setter Property="Fill" Value="{DynamicResource SplitViewLightDismissOverlayBackground}" />
<Setter Property="Fill" Value="{DynamicResource SplitViewLightDismissOverlayBackground}" />
</Style>
</Style>