This article explains about Content dialog in C++/WinRT. It forces the user to get the input (whether success or failure) until the user cannot interact with Parent windows.
Before reading this article, I highly recommend reading the previous parts of the series.
In this article, we are going to learn about ContentDialog in Modern C++
Modal dialogIt forces the user to get the input (whether success or failure) until user cannot interact with Parent windows. Modal dialog is called child dialog.
ExampleVS - Account Settings, then Enter the product key dialog (Modal Dialog), without close this dialog. User cannot interact with the parent dialogue.
ContentDialog
ContentDialog is a modal dialog, it has title, content, default three buttons, primary, secondary and close buttons. This dialog is completely customizable, like all the properties we can assign our own control or styles
Show ContentDialog
ContentDialogResult
ContentDialog return the ContentDialogResult as a return value
ContentDialog content property is use to customize the dialog content area, this property is like a container control, prepare the controls you want to use, prepare the list and add it in to panel control, finally assign the panel control to the content property
Ex: below sample code prepares the header text and two checkboxes are added into the ContentDialog
I hope you understood how to use ContentDialog control.
Microsoft's Windows AppStudio