Example #1
0
        public DisplayMessageDialog(DisplayMessageDialog_ViewModel vm)
        {
            InitializeComponent();

            m_VM             = vm;
            this.DataContext = m_VM;

            if (CurrentTheme.CurrentColorTheme != null)
            {
                CurrentTheme.CurrentColorTheme.ApplyTheme(this.Resources);
            }
        }
        //=============================================================================
        public Task <object> DisplayMessageDialog(string strMessage)
        {
            try
            {
                DisplayMessageDialog_ViewModel dialogVM = new DisplayMessageDialog_ViewModel(strMessage);
                DisplayMessageDialog           dialog   = new DisplayMessageDialog(dialogVM);

                Task <object> task = DialogHost.Show(dialog);
                return(task);
            }
            catch { }

            return(null);
        }