Skip to content

Commit e2091ed

Browse files
committed
fix MahApps Progress sample
1 parent c8135c1 commit e2091ed

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

MahMaterialDragablzMashUp/DialogsViewModel.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ private void InputDialog()
4444
DialogCoordinator.Instance.ShowInputAsync(this, "MahApps Dialog", "Using Material Design Themes", metroDialogSettings);
4545
}
4646

47-
private void ProgressDialog()
47+
private async void ProgressDialog()
4848
{
4949
var metroDialogSettings = new MetroDialogSettings
5050
{
@@ -53,12 +53,15 @@ private void ProgressDialog()
5353
SuppressDefaultResources = true
5454
};
5555

56-
DialogCoordinator.Instance.ShowProgressAsync(this, "MahApps Dialog", "Using Material Design Themes (WORK IN PROGRESS)", true, metroDialogSettings);
56+
var controller = await DialogCoordinator.Instance.ShowProgressAsync(this, "MahApps Dialog", "Using Material Design Themes (WORK IN PROGRESS)", true, metroDialogSettings);
57+
controller.SetIndeterminate();
58+
await Task.Delay(3000);
59+
await controller.CloseAsync();
5760
}
5861

5962
private void ShowLeftFlyout()
6063
{
61-
((MainWindow)Application.Current.MainWindow).LeftFlyout.IsOpen = true;
64+
((MainWindow)Application.Current.MainWindow).LeftFlyout.IsOpen = !((MainWindow)Application.Current.MainWindow).LeftFlyout.IsOpen;
6265
}
6366
}
6467
}

0 commit comments

Comments
 (0)