Ghost1372

everything can be handy

WindowedContentDialog

Property

Name
Title
Content
RequestedTheme
SystemBackdrop
Foreground
Background
BorderBrush
BorderThickness
CornerRadius
FlowDirection
TitleTemplate
ContentTemplate
PrimaryButtonText
SecondaryButtonText
CloseButtonText
IsPrimaryButtonEnabled
IsSecondaryButtonEnabled
DefaultButton
PrimaryButtonStyle
SecondaryButtonStyle
CloseButtonStyle

Events

Name
PrimaryButtonClick
SecondaryButtonClick
CloseButtonClick

Methods

Name
ShowAsync

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
WindowedContentDialog dialog = new()
{
Title = "Title",
Content = "Content",
PrimaryButtonText = "Primary",
SecondaryButtonText = "Secondary",
CloseButtonText = "Close",
OwnerWindow = myWindow,
HasTitleBar = true
};

ContentDialogResult result = await dialog.ShowAsync(true);
var result = result.ToString();

DevWinUI

Demo

you can run demo and see this feature.

0%