|
5 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
6 | 6 | xmlns:local="clr-namespace:MaterialDesignDemo.TransitionsDemo"
|
7 | 7 | xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
| 8 | + xmlns:codeDisplayer="clr-namespace:CodeDisplayer;assembly=CodeDisplayer" |
8 | 9 | mc:Ignorable="d"
|
9 | 10 | d:DesignHeight="300" d:DesignWidth="300">
|
10 | 11 | <UserControl.Resources>
|
|
14 | 15 | </ResourceDictionary.MergedDictionaries>
|
15 | 16 | </ResourceDictionary>
|
16 | 17 | </UserControl.Resources>
|
17 |
| - <Grid> |
18 |
| - <Grid.RowDefinitions> |
19 |
| - <RowDefinition Height="Auto" /> |
20 |
| - <RowDefinition Height="Auto" /> |
21 |
| - <RowDefinition Height="256" /> |
22 |
| - </Grid.RowDefinitions> |
23 |
| - <TextBlock Style="{StaticResource MaterialDesignDisplay2TextBlock}">Transitions Demo</TextBlock> |
| 18 | + <ScrollViewer> |
| 19 | + <codeDisplayer:XamlDisplayerPanel MaxWidth="800" x:Name="XamlDisplayerPanel" DisplayMode="TopBottom"> |
| 20 | + <Grid> |
| 21 | + <Grid.RowDefinitions> |
| 22 | + <RowDefinition Height="Auto" /> |
| 23 | + <RowDefinition Height="Auto" /> |
| 24 | + <RowDefinition Height="256" /> |
| 25 | + </Grid.RowDefinitions> |
| 26 | + <TextBlock Style="{StaticResource MaterialDesignDisplay2TextBlock}">Transitions Demo</TextBlock> |
24 | 27 |
|
25 |
| - <!-- the transitioner will manage your transitions. notice how SelectedIndex is set to zero: the first slide (instead of the default of -1) --> |
26 |
| - <materialDesign:Transitioner Grid.Row="1" SelectedIndex="0" AutoApplyTransitionOrigins="True"> |
| 28 | + <!-- the transitioner will manage your transitions. notice how SelectedIndex is set to zero: the first slide (instead of the default of -1) --> |
| 29 | + <materialDesign:Transitioner Grid.Row="1" SelectedIndex="0" AutoApplyTransitionOrigins="True"> |
27 | 30 |
|
28 |
| - <!-- you can use a slide for each page, let's add a touch of fade for our first page --> |
29 |
| - <materialDesign:TransitionerSlide OpeningEffect="{materialDesign:TransitionEffect FadeIn}"> |
30 |
| - <local:Slide1_Intro /> |
31 |
| - </materialDesign:TransitionerSlide> |
| 31 | + <!-- you can use a slide for each page, let's add a touch of fade for our first page --> |
| 32 | + <materialDesign:TransitionerSlide OpeningEffect="{materialDesign:TransitionEffect FadeIn}"> |
| 33 | + <local:Slide1_Intro /> |
| 34 | + </materialDesign:TransitionerSlide> |
32 | 35 |
|
33 |
| - <!-- but you can use bare xaml too --> |
34 |
| - <local:Slide2_Intro /> |
| 36 | + <!-- but you can use bare xaml too --> |
| 37 | + <local:Slide2_Intro /> |
35 | 38 |
|
36 |
| - <!-- you can control (and create your own) wipes --> |
37 |
| - <materialDesign:TransitionerSlide> |
38 |
| - <materialDesign:TransitionerSlide.BackwardWipe> |
39 |
| - <materialDesign:CircleWipe /> |
40 |
| - </materialDesign:TransitionerSlide.BackwardWipe> |
41 |
| - <materialDesign:TransitionerSlide.ForwardWipe> |
42 |
| - <materialDesign:SlideWipe Direction="Right" /> |
43 |
| - </materialDesign:TransitionerSlide.ForwardWipe> |
44 |
| - <local:Slide3_Intro /> |
45 |
| - </materialDesign:TransitionerSlide> |
| 39 | + <!-- you can control (and create your own) wipes --> |
| 40 | + <materialDesign:TransitionerSlide> |
| 41 | + <materialDesign:TransitionerSlide.BackwardWipe> |
| 42 | + <materialDesign:CircleWipe /> |
| 43 | + </materialDesign:TransitionerSlide.BackwardWipe> |
| 44 | + <materialDesign:TransitionerSlide.ForwardWipe> |
| 45 | + <materialDesign:SlideWipe Direction="Right" /> |
| 46 | + </materialDesign:TransitionerSlide.ForwardWipe> |
| 47 | + <local:Slide3_Intro /> |
| 48 | + </materialDesign:TransitionerSlide> |
46 | 49 |
|
47 |
| - <!-- now we are going to slide this in by combining some extra effects. the inner content slides in, so we'll set the outer background and clip, to keep things nice --> |
48 |
| - <materialDesign:TransitionerSlide Background="{DynamicResource MaterialDesignDarkBackground}" |
| 50 | + <!-- now we are going to slide this in by combining some extra effects. the inner content slides in, so we'll set the outer background and clip, to keep things nice --> |
| 51 | + <materialDesign:TransitionerSlide Background="{DynamicResource MaterialDesignDarkBackground}" |
49 | 52 | Foreground="{DynamicResource MaterialDesignDarkForeground}"
|
50 | 53 | ClipToBounds="True">
|
51 |
| - <materialDesign:TransitionerSlide.OpeningEffects> |
52 |
| - <materialDesign:TransitionEffect Kind="SlideInFromLeft" Duration="0:0:0.8" /> |
53 |
| - <materialDesign:TransitionEffect Kind="SlideInFromBottom" Duration="0:0:0.8" OffsetTime="0:0:0.15" /> |
54 |
| - </materialDesign:TransitionerSlide.OpeningEffects> |
55 |
| - <local:Slide4_CombineTransitions /> |
56 |
| - </materialDesign:TransitionerSlide> |
| 54 | + <materialDesign:TransitionerSlide.OpeningEffects> |
| 55 | + <materialDesign:TransitionEffect Kind="SlideInFromLeft" Duration="0:0:0.8" /> |
| 56 | + <materialDesign:TransitionEffect Kind="SlideInFromBottom" Duration="0:0:0.8" OffsetTime="0:0:0.15" /> |
| 57 | + </materialDesign:TransitionerSlide.OpeningEffects> |
| 58 | + <local:Slide4_CombineTransitions /> |
| 59 | + </materialDesign:TransitionerSlide> |
57 | 60 |
|
58 |
| - <local:Slide5_TransitioningContent /> |
| 61 | + <local:Slide5_TransitioningContent /> |
59 | 62 |
|
60 |
| - <local:Slide6_Origins /> |
61 |
| - |
62 |
| - <local:Slide7_MVVM /> |
| 63 | + <local:Slide6_Origins /> |
63 | 64 |
|
64 |
| - </materialDesign:Transitioner> |
| 65 | + <local:Slide7_MVVM /> |
65 | 66 |
|
66 |
| - </Grid> |
67 |
| - |
| 67 | + </materialDesign:Transitioner> |
| 68 | + |
| 69 | + </Grid> |
| 70 | + </codeDisplayer:XamlDisplayerPanel> |
| 71 | + </ScrollViewer> |
68 | 72 | </UserControl>
|
0 commit comments