-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
41 lines (37 loc) · 2.24 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<Window x:Class="CandidateAssessment.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:views="clr-namespace:CandidateAssessment.Views"
xmlns:viewModels="clr-namespace:CandidateAssessment.ViewModels"
Title="Data Importer" Width="800" Height="600"
ResizeMode="CanMinimize"
WindowStartupLocation="CenterScreen">
<Window.Resources>
<views:ConnectionScreen x:Key="ConnectionScreen" DataContext="{Binding Connection}" />
<views:ImportDetailsScreen x:Key="ImportDetailsScreen" DataContext="{Binding ImportDetails}" />
<views:ImportScreen x:Key="ImportScreen" DataContext="{Binding Import}" />
<views:ResultsScreen x:Key="ResultsScreen" DataContext="{Binding Results}" />
</Window.Resources>
<Grid>
<ContentControl>
<ContentControl.Style>
<Style TargetType="{x:Type ContentControl}" BasedOn="{StaticResource {x:Type ContentControl}}">
<Style.Triggers>
<DataTrigger Binding="{Binding CurrentStage}" Value="{x:Static viewModels:AppStage.GetConnection}">
<Setter Property="Content" Value="{StaticResource ConnectionScreen}" />
</DataTrigger>
<DataTrigger Binding="{Binding CurrentStage}" Value="{x:Static viewModels:AppStage.PreImport}">
<Setter Property="Content" Value="{StaticResource ImportDetailsScreen}" />
</DataTrigger>
<DataTrigger Binding="{Binding CurrentStage}" Value="{x:Static viewModels:AppStage.ImportProgress}">
<Setter Property="Content" Value="{StaticResource ImportScreen}" />
</DataTrigger>
<DataTrigger Binding="{Binding CurrentStage}" Value="{x:Static viewModels:AppStage.ImportResult}">
<Setter Property="Content" Value="{StaticResource ResultsScreen}" />
</DataTrigger>
</Style.Triggers>
</Style>
</ContentControl.Style>
</ContentControl>
</Grid>
</Window>