Exemple #1
0
        public YesNo_Dialog(YesNoDialog_ViewModel vm)
        {
            InitializeComponent();

            m_VM        = vm;
            DataContext = m_VM;

            if (CurrentTheme.CurrentColorTheme != null)
            {
                CurrentTheme.CurrentColorTheme.ApplyTheme(this.Resources);
            }
        }
        //=============================================================================
        public Task <object> YesNoCancelDialog(string strContent, out IYesNoCancelViewModel vm)
        {
            vm = null;

            if (DlgHost == null)
            {
                return(null);
            }

            try
            {
                YesNoDialog_ViewModel dialogVM = new YesNoDialog_ViewModel(strContent);
                vm = dialogVM;
                YesNo_Dialog dialog = new YesNo_Dialog(dialogVM);

                return(DialogHost.Show(dialog));
            }
            catch { }

            return(null);
        }