I know I can write css for rz-dialog-content and change it globally but I'd like to know if it's possible to change it for only selected content
Hi @marekm294,
You can try setting CssClass or WrapperCssClass when opening the dialog:
DialogService.OpenAsync<MyPage>("My dialog", new Dictionary<string, object>(), new DialogOptions
{
CssClass = "my-class",
WrapperCssClass = "my-wrapper-class"
});
I know I can but I'd like to change rz-dialog-content padding and CssClass/WrapperCssClass aren't so much helpful.
You can always use nested CSS selectors.
.my-class .rz-dialog-content
{
}
1 Like
I would like to customize the red OK button, the confirm button, how can I do it?
You can use the ContentCssClass and some CSS:
.my-dialog .rz-dialog-confirm-buttons .rz-primary {
background: green;
}
DialogService.Confirm("Are you sure?", "MyTitle",
new ConfirmOptions {
ContentCssClass="my-dialog",
OkButtonText = "Yes", CancelButtonText = "No"
});
1 Like
Perfect. If I press enter on the keyboard it defaults to yes. How can I change this setting? It can be dangerous. I would prefer the default to be no.
How can I do this?
best regards
This is currently not supported.