コード例 #1
0
        void ShowDialogInternal(string name, IDialogParameters parameters, Action <IDialogResult> callback, string windowName = null)
        {
            IContentDialog contentDialog = CreateDialogWindow(windowName);

            ConfigureDialogWindowEvents(contentDialog, callback);
            ConfigureDialogWindowContent(name, contentDialog, parameters);

            _ = contentDialog.ShowAsync();
        }
コード例 #2
0
        private IAsyncOperation <ContentDialogResult> ShowContentDialogAsync(
            INotifyPropertyChanged viewModel,
            Type contentDialogType)
        {
            Logger.Write($"Content dialog: {contentDialogType}; View model: {viewModel.GetType()}");

            IContentDialog dialog = CreateContentDialog(contentDialogType, viewModel);

            return(dialog.ShowAsync());
        }