|
@@ -4,6 +4,7 @@
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
xmlns:vm="using:ControlCatalog.ViewModels"
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
+ Height="{Binding $parent[ScrollViewer].Bounds.Height}"
|
|
|
x:DataType="vm:TransitioningContentControlPageViewModel"
|
|
|
x:CompileBindings="True"
|
|
|
x:Class="ControlCatalog.Pages.TransitioningContentControlPage">
|
|
@@ -11,25 +12,63 @@
|
|
|
<UserControl.DataContext>
|
|
|
<vm:TransitioningContentControlPageViewModel />
|
|
|
</UserControl.DataContext>
|
|
|
+
|
|
|
+ <UserControl.Styles>
|
|
|
+ <Style Selector="HeaderedContentControl">
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate>
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="Auto" SharedSizeGroup="HeaderCol" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <ContentPresenter Content="{TemplateBinding Header}"
|
|
|
+ Grid.Column="0"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <ContentPresenter Content="{TemplateBinding Content}"
|
|
|
+ Grid.Column="1"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </Grid>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+ </UserControl.Styles>
|
|
|
<DockPanel LastChildFill="True">
|
|
|
|
|
|
<TextBlock DockPanel.Dock="Top" Classes="h2">The TransitioningContentControl control allows you to show a page transition whenever the Content changes.</TextBlock>
|
|
|
|
|
|
- <Border DockPanel.Dock="Bottom" Background="{DynamicResource ThemeControlLowBrush}">
|
|
|
- <StackPanel Margin="5" Spacing="5">
|
|
|
- <TextBlock>Select a transition</TextBlock>
|
|
|
- <ComboBox Items="{Binding PageTransitions}" SelectedItem="{Binding SelectedTransition}" />
|
|
|
+ <ExperimentalAcrylicBorder DockPanel.Dock="Bottom" Margin="10" CornerRadius="5" >
|
|
|
+ <ExperimentalAcrylicBorder.Material>
|
|
|
+ <ExperimentalAcrylicMaterial BackgroundSource="Digger" TintColor="White" />
|
|
|
+ </ExperimentalAcrylicBorder.Material>
|
|
|
+
|
|
|
+ <StackPanel Margin="5" Spacing="5" Grid.IsSharedSizeScope="True">
|
|
|
+ <HeaderedContentControl Header="Select a transition">
|
|
|
+ <ComboBox Items="{Binding PageTransitions}" SelectedItem="{Binding SelectedTransition}" />
|
|
|
+ </HeaderedContentControl>
|
|
|
+ <HeaderedContentControl Header="Duration">
|
|
|
+ <NumericUpDown Value="{Binding Duration}" Increment="250" Minimum="100" />
|
|
|
+ </HeaderedContentControl>
|
|
|
+ <HeaderedContentControl Header="Clip to Bounds">
|
|
|
+ <ToggleSwitch IsChecked="{Binding ClipToBounds}" />
|
|
|
+ </HeaderedContentControl>
|
|
|
</StackPanel>
|
|
|
- </Border>
|
|
|
-
|
|
|
+ </ExperimentalAcrylicBorder>
|
|
|
+
|
|
|
<Button DockPanel.Dock="Left" Command="{Binding PrevImage}" Content="<" />
|
|
|
<Button DockPanel.Dock="Right" Command="{Binding NextImage}" Content=">" />
|
|
|
-<TransitioningContentControl Content="{Binding SelectedImage}" PageTransition="{Binding SelectedTransition.Transition}" >
|
|
|
- <TransitioningContentControl.ContentTemplate>
|
|
|
- <DataTemplate DataType="Bitmap">
|
|
|
- <Image Source="{Binding}" />
|
|
|
- </DataTemplate>
|
|
|
- </TransitioningContentControl.ContentTemplate>
|
|
|
-</TransitioningContentControl>
|
|
|
-</DockPanel>
|
|
|
+
|
|
|
+ <Border ClipToBounds="{Binding ClipToBounds}" Margin="5">
|
|
|
+ <TransitioningContentControl Content="{Binding SelectedImage}"
|
|
|
+ PageTransition="{Binding SelectedTransition.Transition}" >
|
|
|
+ <TransitioningContentControl.ContentTemplate>
|
|
|
+ <DataTemplate DataType="Bitmap">
|
|
|
+ <Image Source="{Binding}" />
|
|
|
+ </DataTemplate>
|
|
|
+ </TransitioningContentControl.ContentTemplate>
|
|
|
+ </TransitioningContentControl>
|
|
|
+ </Border>
|
|
|
+ </DockPanel>
|
|
|
</UserControl>
|