|
@@ -51,7 +51,7 @@
|
|
|
HorizontalAlignment="Right" />
|
|
|
</Panel>
|
|
|
|
|
|
- <Panel Name="ContentRoot">
|
|
|
+ <Panel Name="ContentRoot" Grid.Column="1">
|
|
|
<ContentPresenter x:Name="PART_ContentPresenter"
|
|
|
Content="{TemplateBinding Content}"
|
|
|
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
|
@@ -135,11 +135,11 @@
|
|
|
Width="1" HorizontalAlignment="Left" />
|
|
|
</Panel>
|
|
|
|
|
|
- <Panel Name="ContentRoot">
|
|
|
+ <Panel Name="ContentRoot" Grid.Column="0">
|
|
|
<ContentPresenter x:Name="PART_ContentPresenter"
|
|
|
Content="{TemplateBinding Content}"
|
|
|
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
|
|
- <Rectangle Name="LightDismissLayer" IsVisible="False"/>
|
|
|
+ <Rectangle Name="LightDismissLayer" Fill="Transparent" IsVisible="False"/>
|
|
|
</Panel>
|
|
|
|
|
|
</Grid>
|
|
@@ -195,48 +195,254 @@
|
|
|
</Style>
|
|
|
</Style>
|
|
|
|
|
|
- <Style Selector="^:open">
|
|
|
- <Style Selector="^ /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="^ /template/ Rectangle#LightDismissLayer">
|
|
|
- <Setter Property="Transitions">
|
|
|
- <Transitions>
|
|
|
- <DoubleTransition Property="Opacity"
|
|
|
- Duration="{StaticResource SplitViewPaneAnimationOpenDuration}"
|
|
|
- Easing="{StaticResource SplitViewPaneAnimationEasing}" />
|
|
|
- </Transitions>
|
|
|
- </Setter>
|
|
|
- <Setter Property="Opacity" Value="1.0"/>
|
|
|
+ <!-- TOP placement -->
|
|
|
+ <Style Selector="^:top">
|
|
|
+ <Setter Property="Template">
|
|
|
+ <ControlTemplate>
|
|
|
+ <Grid Name="Container" Background="{TemplateBinding Background}">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneRowGridLength}"/>
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+
|
|
|
+ <Panel Name="PART_PaneRoot"
|
|
|
+ Background="{TemplateBinding PaneBackground}"
|
|
|
+ ClipToBounds="True"
|
|
|
+ VerticalAlignment="Top"
|
|
|
+ ZIndex="100">
|
|
|
+ <ContentPresenter x:Name="PART_PanePresenter"
|
|
|
+ Content="{TemplateBinding Pane}"
|
|
|
+ ContentTemplate="{TemplateBinding PaneTemplate}" />
|
|
|
+ <Rectangle Name="HCPaneBorder"
|
|
|
+ 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 Selector="^:closed">
|
|
|
- <Style Selector="^ /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="^ /template/ Rectangle#LightDismissLayer">
|
|
|
- <Setter Property="Transitions">
|
|
|
- <Transitions>
|
|
|
- <DoubleTransition Property="Opacity" Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" Easing="{StaticResource SplitViewPaneAnimationEasing}" />
|
|
|
- </Transitions>
|
|
|
- </Setter>
|
|
|
- <Setter Property="Opacity" Value="0.0"/>
|
|
|
+ <!-- BOTTOM placement -->
|
|
|
+ <Style Selector="^:bottom">
|
|
|
+ <Setter Property="Template">
|
|
|
+ <ControlTemplate>
|
|
|
+ <Grid Name="Container" Background="{TemplateBinding Background}">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
+ <RowDefinition Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneRowGridLength}"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+
|
|
|
+ <Panel Name="PART_PaneRoot" Background="{TemplateBinding PaneBackground}"
|
|
|
+ ClipToBounds="True"
|
|
|
+ VerticalAlignment="Bottom"
|
|
|
+ ZIndex="100">
|
|
|
+ <ContentPresenter x:Name="PART_PanePresenter"
|
|
|
+ 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>
|
|
|
|
|
|
+ <!-- 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">
|
|
|
<Setter Property="Fill" Value="{DynamicResource SplitViewLightDismissOverlayBackground}" />
|
|
|
</Style>
|