MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit
Nested dialog not visible after closing and reopening parent dialog
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 16.3k
- 派生
- 3.5k
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 8
描述
Bug explanation
When you close a parent dialog which has a nested dialog open, the nested dialog becomes invisible the next time you open the parent dialog, it prevents all input because only the nested dialog PART_ContentCoverGrid is visible:
https://github.com/user-attachments/assets/dab526c5-eae5-4ee2-98a3-2b884cadb849
This seems to work fine with TransitionAssist.DisableTransitions="True":
https://github.com/user-attachments/assets/034231da-d54e-48c3-b3d8-89cd2375fa1d
Steps:
- Open
Rootdialog Rootdialog opensInnerdialog- Close
Rootdialog - Reopen
Rootdialog
public RootDialog RootDialog { get; } = new();
public MainWindow()
{
InitializeComponent();
_ = Application.Current.Dispatcher.InvokeAsync(async () =>
{
await Delay();
_ = DialogHost.Show(RootDialog);
await Delay();
RootDialog.OpenInnerDialog();
await Delay();
DialogHost.GetDialogSession(null)!.Close();
await Delay();
_ = DialogHost.Show(RootDialog);
});
static Task Delay() => Task.Delay(2000);
}
I'm not sure if this is even desired behavior, I assumed that all nested dialogs would close when parent is closed.
Hope I described the issue clearly, its a little bit hard to explain.
Version
5.1.0
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,在启用过渡效果的情况下,使用 DialogHost.Show 和一个嵌套对话框复现 issue 中的序列;将其与 TransitionAssist.DisableTransitions="True" 进行比较。跟踪父对话框关闭和重新打开期间 DialogHost 与嵌套对话框的状态,然后验证重新打开的父对话框不再只留下 PART_ContentCoverGrid 可见或阻止输入。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp
- 领域
- desktop
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100