Fixed Show dialog bug and updated nuget packages

This commit is contained in:
Holger Börchers 2020-06-05 20:48:16 +02:00
parent 0cf6664ee1
commit 7874f71ca2
3 changed files with 8 additions and 8 deletions

View File

@ -22,7 +22,7 @@ namespace ModernWpfPlayground
public MainWindowViewModel()
{
ShowDialogCommand = new DelegateCommand(() => ShowDialogAsync().Await());
ShowDialogCommand = new DelegateCommand(ShowDialog);
CloseCommand = new DelegateCommand(() => Application.Current.Shutdown());
OpenViewModelCommand = new DelegateCommand(LoadViewModel);
SaveViewModelCommand = new DelegateCommand(SaveViewModel);
@ -35,10 +35,10 @@ namespace ModernWpfPlayground
_deserializer = new DeserializerBuilder().Build();
}
public string? Path
private string? Path
{
get => _path;
private set => SetProperty(ref _path, value,
set => SetProperty(ref _path, value,
() => Title = value != null ? $"{System.IO.Path.GetFileName(value)} - {AppName}" : AppName);
}
@ -123,11 +123,10 @@ namespace ModernWpfPlayground
};
}
private async Task ShowDialogAsync()
private void ShowDialog()
{
var dialog = new ContentDialogExample {Message = WelcomeMessage};
var result = await dialog.ShowAsync().ConfigureAwait(false);
WelcomeMessage = result.ToString();
dialog.ShowAsync().Await(completedCallback: x => WelcomeMessage = x.ToString());
}
private void BooleanValue_OnChanged(bool obj)

View File

@ -9,10 +9,10 @@
<ItemGroup>
<PackageReference Include="FastMember" Version="1.5.0" />
<PackageReference Include="ModernWpfUI" Version="0.9.0-preview.200505.0" />
<PackageReference Include="ModernWpfUI" Version="0.9.0-preview.200528.0" />
<PackageReference Include="Prism.DryIoc" Version="8.0.0.1740-pre" />
<PackageReference Include="Prism.Wpf" Version="8.0.0.1740-pre" />
<PackageReference Include="YamlDotNet" Version="8.1.1" />
<PackageReference Include="YamlDotNet" Version="8.1.2" />
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
</ItemGroup>

View File

@ -7,6 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ModernWpfUI" Version="0.9.0-preview.200528.0" />
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
</ItemGroup>