Skip to content

Commit 057212a

Browse files
committed
scaffolding for transitions mvvm demo
1 parent 57be586 commit 057212a

10 files changed

+188
-4
lines changed

MainDemo.Wpf/MaterialDesignDemo.csproj

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,16 @@
165165
<Compile Include="TransitionsDemo\Slide5_TransitioningContent.xaml.cs">
166166
<DependentUpon>Slide5_TransitioningContent.xaml</DependentUpon>
167167
</Compile>
168+
<Compile Include="TransitionsDemo\Slide6_MVVM.xaml.cs">
169+
<DependentUpon>Slide6_MVVM.xaml</DependentUpon>
170+
</Compile>
171+
<Compile Include="TransitionsDemo\Slide7_Master.xaml.cs">
172+
<DependentUpon>Slide7_Master.xaml</DependentUpon>
173+
</Compile>
174+
<Compile Include="TransitionsDemo\Slide7_MasterModel.cs" />
175+
<Compile Include="TransitionsDemo\Slide8_Details.xaml.cs">
176+
<DependentUpon>Slide8_Details.xaml</DependentUpon>
177+
</Compile>
168178
<Compile Include="TransitionsDemo\TransitionsDemoHome.xaml.cs">
169179
<DependentUpon>TransitionsDemoHome.xaml</DependentUpon>
170180
</Compile>
@@ -298,6 +308,18 @@
298308
<SubType>Designer</SubType>
299309
<Generator>MSBuild:Compile</Generator>
300310
</Page>
311+
<Page Include="TransitionsDemo\Slide6_MVVM.xaml">
312+
<SubType>Designer</SubType>
313+
<Generator>MSBuild:Compile</Generator>
314+
</Page>
315+
<Page Include="TransitionsDemo\Slide7_Master.xaml">
316+
<SubType>Designer</SubType>
317+
<Generator>MSBuild:Compile</Generator>
318+
</Page>
319+
<Page Include="TransitionsDemo\Slide8_Details.xaml">
320+
<SubType>Designer</SubType>
321+
<Generator>MSBuild:Compile</Generator>
322+
</Page>
301323
<Page Include="TransitionsDemo\TransitionsDemoHome.xaml">
302324
<SubType>Designer</SubType>
303325
<Generator>MSBuild:Compile</Generator>

MainDemo.Wpf/TransitionsDemo/Slide5_TransitioningContent.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
</materialDesign:TransitioningContent>
103103

104104
</UniformGrid>
105-
<StackPanel Orientation="Horizontal" Grid.Row="2">
105+
<StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Right">
106106
<Button Style="{DynamicResource MaterialDesignFloatingActionMiniButton}"
107107
Command="{x:Static materialDesign:Transitioner.MovePreviousCommand}"
108108
VerticalAlignment="Center" HorizontalAlignment="Left"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<UserControl x:Class="MaterialDesignDemo.TransitionsDemo.Slide6_MVVM"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6+
xmlns:local="clr-namespace:MaterialDesignDemo.TransitionsDemo"
7+
mc:Ignorable="d"
8+
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
9+
d:DesignHeight="300" d:DesignWidth="300">
10+
<materialDesign:ColorZone Mode="Light" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
11+
<Grid Margin="64">
12+
<Grid.RowDefinitions>
13+
<RowDefinition Height="Auto" />
14+
<RowDefinition Height="Auto" />
15+
</Grid.RowDefinitions>
16+
<TextBlock Style="{DynamicResource MaterialDesignHeadlineTextBlock}" TextWrapping="Wrap" TextAlignment="Center">Finally, we will put it all together to create full master &amp; details pages, controlled via MVVM.</TextBlock>
17+
<StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center">
18+
<Button Style="{DynamicResource MaterialDesignFloatingActionMiniButton}"
19+
Command="{x:Static materialDesign:Transitioner.MovePreviousCommand}"
20+
VerticalAlignment="Center" HorizontalAlignment="Left"
21+
Margin="16">
22+
<materialDesign:PackIcon Kind="StepBackward" />
23+
</Button>
24+
<Button Style="{DynamicResource MaterialDesignFloatingActionAccentButton}"
25+
Command="{x:Static materialDesign:Transitioner.MoveNextCommand}"
26+
VerticalAlignment="Top"
27+
Margin="16">
28+
<materialDesign:PackIcon Kind="StepForward" />
29+
</Button>
30+
</StackPanel>
31+
</Grid>
32+
</materialDesign:ColorZone>
33+
</UserControl>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows;
7+
using System.Windows.Controls;
8+
using System.Windows.Data;
9+
using System.Windows.Documents;
10+
using System.Windows.Input;
11+
using System.Windows.Media;
12+
using System.Windows.Media.Imaging;
13+
using System.Windows.Navigation;
14+
using System.Windows.Shapes;
15+
16+
namespace MaterialDesignDemo.TransitionsDemo
17+
{
18+
/// <summary>
19+
/// Interaction logic for Slide6_MVVM.xaml
20+
/// </summary>
21+
public partial class Slide6_MVVM : UserControl
22+
{
23+
public Slide6_MVVM()
24+
{
25+
InitializeComponent();
26+
}
27+
}
28+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<UserControl x:Class="MaterialDesignDemo.TransitionsDemo.Slide7_Master"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6+
xmlns:local="clr-namespace:MaterialDesignDemo.TransitionsDemo"
7+
mc:Ignorable="d"
8+
d:DesignHeight="300" d:DesignWidth="300">
9+
<Grid>
10+
11+
</Grid>
12+
</UserControl>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows;
7+
using System.Windows.Controls;
8+
using System.Windows.Data;
9+
using System.Windows.Documents;
10+
using System.Windows.Input;
11+
using System.Windows.Media;
12+
using System.Windows.Media.Imaging;
13+
using System.Windows.Navigation;
14+
using System.Windows.Shapes;
15+
16+
namespace MaterialDesignDemo.TransitionsDemo
17+
{
18+
/// <summary>
19+
/// Interaction logic for Slide7_Master.xaml
20+
/// </summary>
21+
public partial class Slide7_Master : UserControl
22+
{
23+
public Slide7_Master()
24+
{
25+
InitializeComponent();
26+
}
27+
}
28+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace MaterialDesignDemo.TransitionsDemo
8+
{
9+
public class Slide7_MasterModel
10+
{
11+
}
12+
13+
public class Slide8_DetailsModel
14+
{
15+
16+
}
17+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<UserControl x:Class="MaterialDesignDemo.TransitionsDemo.Slide8_Details"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6+
xmlns:local="clr-namespace:MaterialDesignDemo.TransitionsDemo"
7+
mc:Ignorable="d"
8+
d:DesignHeight="300" d:DesignWidth="300">
9+
<Grid>
10+
11+
</Grid>
12+
</UserControl>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows;
7+
using System.Windows.Controls;
8+
using System.Windows.Data;
9+
using System.Windows.Documents;
10+
using System.Windows.Input;
11+
using System.Windows.Media;
12+
using System.Windows.Media.Imaging;
13+
using System.Windows.Navigation;
14+
using System.Windows.Shapes;
15+
16+
namespace MaterialDesignDemo.TransitionsDemo
17+
{
18+
/// <summary>
19+
/// Interaction logic for Slide8_Details.xaml
20+
/// </summary>
21+
public partial class Slide8_Details : UserControl
22+
{
23+
public Slide8_Details()
24+
{
25+
InitializeComponent();
26+
}
27+
}
28+
}

MainDemo.Wpf/TransitionsDemo/TransitionsDemoHome.xaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,13 @@
3838
<local:Slide4_CombineTransitions />
3939
</materialDesign:TransitionerSlide>
4040

41-
<materialDesign:TransitionerSlide>
42-
<local:Slide5_TransitioningContent />
43-
</materialDesign:TransitionerSlide>
41+
<local:Slide5_TransitioningContent />
42+
43+
<local:Slide6_MVVM />
44+
45+
<local:Slide7_Master />
46+
47+
<local:Slide8_Details />
4448

4549
</materialDesign:Transitioner>
4650

0 commit comments

Comments
 (0)