Skip to content

Instantly share code, notes, and snippets.

namespace MyProject.Controls
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using MahApps.Metro.Controls;
using MahApps.Metro.Controls.Dialogs;
namespace McKinsey.MarketSimulator.Controls
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using MahApps.Metro.Controls;
using MahApps.Metro.Controls.Dialogs;
LoadingDialog loadingDialog = new LoadingDialog(mainWindow) { Title = "Please wait...", Message = string.Format("Loading project {0} ...", projectName) };
await mainWindow.ShowMetroDialogAsync(loadingDialog).ContinueWith(
async (t) =>
{
// do something
});
public partial class LoadingDialog : BaseMetroDialog
{
public static readonly DependencyProperty MessageProperty = DependencyProperty.Register("Message", typeof(string), typeof(MessageDialog), new PropertyMetadata(default(string)));
internal LoadingDialog(MetroWindow parentWindow)
: this(parentWindow, null)
{
}
internal LoadingDialog(MetroWindow parentWindow, MetroDialogSettings settings)