admin管理员组文章数量:1415673
I am trying to open a dialog in mudblazor, but it seems the execution does not wait for it to close. In this case, the computer will beep while the dialog is still open. Why?
razor:
@inject IDialogService Dialog
code behind:
private async Task ChangeAvatar()
{
var result = await Dialog.ShowAsync<DlgAvatarSelection>("Select avatar",
new DialogOptions { CloseButton = true, CloseOnEscapeKey = true });
Console.Beep(1000, 25);
}
I am trying to open a dialog in mudblazor, but it seems the execution does not wait for it to close. In this case, the computer will beep while the dialog is still open. Why?
razor:
@inject IDialogService Dialog
code behind:
private async Task ChangeAvatar()
{
var result = await Dialog.ShowAsync<DlgAvatarSelection>("Select avatar",
new DialogOptions { CloseButton = true, CloseOnEscapeKey = true });
Console.Beep(1000, 25);
}
Share
Improve this question
edited Feb 11 at 13:36
DarkBee
15.5k8 gold badges72 silver badges118 bronze badges
asked Feb 11 at 13:03
Anders LindénAnders Lindén
7,35213 gold badges60 silver badges121 bronze badges
1 Answer
Reset to default 1Found it, I have to use Show and await the results Result.
var dlg = Dialog.Show<DlgAvatarSelection>("Select avatar");
var result = await dlg.Result;
var data = result.Data;
本文标签: mudblazorHow to open dialog in modal fashionStack Overflow
版权声明:本文标题:mudblazor - How to open dialog in modal fashion? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745209752a2647810.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论