MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit

DialogHost Disappears Question

Đang mở
#1,778 1 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ả

Hi,

I started using DialogHost to popup a dialog to edit some properties of a currently selected item.
However if I switch dialogs while the Edit dialog is displayed, and then return back
the Edit dialog disappears and all I see is the gray parent dialog and no way to recover.

In MainWindows.xaml I have:


Basically the same structure as the MaterialDesign demo, where I have a DrawerHost to popup
the main menu views that you can select from (Home, Inventory, Billing, etc.)
One of the menu items is "Inventory"

In InventoryViewControl.xaml I have another DialogHost so I can popup edit controls for selected items.

In the ViewModel for the InventoryViewControl I have:

private async void OnEditOwnerDialog(object _)
{
// The view associated with this model is defined in InventoryViewControl.xaml !!
var model = new OwnerViewControlModel(SelectedOwnerId);
object result = await MaterialDesignThemes.Wpf.DialogHost.Show(model, "Inventory");
SaveOrCancel answer = (SaveOrCancel)(result ?? SaveOrCancel.None);
switch(answer)
{

In the picture below, showing the RootDialog Drawer menu, the Inventory in the background
and the Owner Information from the OwnerViewControl showing.

If I select "Billing" it switches to Billing, and then when I come back to "Inventory"
all I see is the gray inventory and the OwnerViewControl is not showing and no way to
get it.

Is there an event that I can use to make it pop back up, or would it better to try
to prevent the RootDialog from being able to select a different item?

![image](https://user-images.githubusercontent.com/62405845/80522778-f4227580-8941-11ea-8cec-3dddf6bcf4d8.png)

Thoughts?

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 với MainWindows.xaml và InventoryViewControl.xaml, tập trung vào các phần tử DialogHost lồng nhau được xác định là RootDialog và Inventory. Theo dõi lệnh gọi OnEditOwnerDialog đến DialogHost.Show khi chuyển đổi giữa các chế độ xem Inventory và Billing. Done phải xác định và xác minh hành vi mong muốn khi quay lại Inventory: hộp thoại chủ sở hữu vẫn có thể được khôi phục hoặc việc điều hướng được ngăn chặn phù hợp.

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
Cần làm rõ
Mức phù hợp với người mới
25/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.