Parent window isn't inactive when Common dialog show ?

Jul 25, 2013 at 3:10 AM
I use modern ui (wpf) with vb.net in vs2012 and this is my code
 Private Sub btnModernDialog_Click(sender As Object, e As RoutedEventArgs)
        Dim cdiag As New ModernDialog With {
            .Title = "common dialog",
            .Content = New District
        }
        cdiag.Show()

    End Sub
My problem is a parent window isn't inactive when the dialog active , I can click any button or menu in the parrent window . What can i do to set inactive parent window like a demo program.

Regard. Migkie
Jul 25, 2013 at 6:35 AM
Do it, like you would do it with any other WPF window that should be modal: call ShowDialog() instead of just Show().
Jul 25, 2013 at 12:21 PM
felixdd wrote:
Do it, like you would do it with any other WPF window that should be modal: call ShowDialog() instead of just Show().
It's not work , I tested. When I call Showdialog() instead of Show(); The parent windows can do every things ....
Jul 25, 2013 at 3:47 PM
Edited Jul 25, 2013 at 9:37 PM
If there is a second thread, doing something with the UI of the parent window, then the ShowDialog() doesn't stop this. But it prevents a user from accessing the parent window. If not then you are doing something wrong. What is it? I don't know, w/o a sample project I can't analyze your code.

To prove the other way round, start the m:ui demo app, change in Content\ControlsModernDialog.xaml.cs the ShowDialog() to Show(), and watch the difference.
Jul 26, 2013 at 2:54 AM
It's look like a bug in vb.net -*- , I try to test as C# and every things work.