MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit
DialogHost Disappears Question
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C#
- Estrellas
- 16.3k
- Forks
- 3.5k
- Merge medio
- 1 d 22 h
- PR fusionados (30 d)
- 8
Descripción
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?

Thoughts?
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con MainWindows.xaml e InventoryViewControl.xaml, centrándote en los elementos DialogHost anidados identificados como RootDialog e Inventory. Traza la llamada OnEditOwnerDialog hasta DialogHost.Show al cambiar entre las vistas Inventory y Billing. Done debe definir y verificar el comportamiento esperado al volver a Inventory: el diálogo del propietario sigue pudiéndose recuperar o la navegación se impide adecuadamente.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp
- Área
- desktop
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100