MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit

Nested dialog not visible after closing and reopening parent dialog

Đang mở
#3,735 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

bug evaluation required
Ngôn ngữ chính
C#
Star
16.3k
Fork
3.5k
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
8

Mô tả

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 Root dialog
  • Root dialog opens Inner dialog
  • Close Root dialog
  • Reopen Root dialog
    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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện chuỗi trong issue với DialogHost.Show, một hộp thoại lồng nhau và các chuyển tiếp được bật; so sánh với TransitionAssist.DisableTransitions="True". Theo dõi trạng thái của DialogHost và hộp thoại lồng nhau trong quá trình đóng và mở lại hộp thoại cha, sau đó xác minh rằng hộp thoại cha được mở lại không còn chỉ để PART_ContentCoverGrid hiển thị hoặc chặn đầu vào.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
csharp
Lĩnh vực
desktop
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.