Able to return a string from the async method
Fixed ObservableObject
This commit is contained in:
@@ -4,9 +4,31 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:WpfViewModelFirst"
|
||||
xmlns:part1="clr-namespace:WpfViewModelFirst.Part1"
|
||||
xmlns:part2="clr-namespace:WpfViewModelFirst.Part2"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type={x:Type local:MainWindowViewModel}}"
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
<Grid>
|
||||
|
||||
<Grid Background="DarkRed">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ContentControl Grid.Row="0"
|
||||
Visibility="Visible"
|
||||
Content="{Binding CurrentViewModel}">
|
||||
<ContentControl.Resources>
|
||||
<DataTemplate DataType="{x:Type part1:Part1ViewModel}">
|
||||
<part1:Part1View/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type part2:Part2ViewModel}">
|
||||
<part2:Part2View/>
|
||||
</DataTemplate>
|
||||
</ContentControl.Resources>
|
||||
</ContentControl>
|
||||
<Button Grid.Row="1"
|
||||
HorizontalAlignment="Center"
|
||||
Command="{Binding StartCommand}"
|
||||
Content="Start"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
Reference in New Issue
Block a user