P
peter.mcclymont
Hi All,
I have a WPF app written in .NET 3.5.
The App.xaml file has a startup method on it like this (the line
Startup=App_Startup),
<Application x:Class="iC3.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Startup="App_Startup">
<Application.Resources>
</Application.Resources>
</Application>
And within that startup method I am doing a number of checks to make
sure the application can start successfully. This is before the main
window is created and displayed.
A couple of those checks require custom dialogs to be displayed one
after the other to allow the user to change some settings, something
like this,
CustomDialog cd = new CustomDialog();
cd.ShowDialog();
if (cd.DialogResult == true)
{
CustomDialog2 cd2 = new CustomDialog2();
cd2.ShowDialog();
}
Well, anyway that is the gist. The problem is that CustomDialog2 does
not display. I can step over the ShowDialog method and it seems to do
nothing. If I check DialogResult after the call to cd2.ShowDialog() it
is null.
The other thing I did was swap the dialogs over, e.g. displayed
CustomDialog2 then CustomDialog. CustomDialog was the one to fail this
time, so it seems that the second dialog to display will fail. It
doesn't seem to relate to the actual dialog classes
Any ideas?
I have a WPF app written in .NET 3.5.
The App.xaml file has a startup method on it like this (the line
Startup=App_Startup),
<Application x:Class="iC3.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Startup="App_Startup">
<Application.Resources>
</Application.Resources>
</Application>
And within that startup method I am doing a number of checks to make
sure the application can start successfully. This is before the main
window is created and displayed.
A couple of those checks require custom dialogs to be displayed one
after the other to allow the user to change some settings, something
like this,
CustomDialog cd = new CustomDialog();
cd.ShowDialog();
if (cd.DialogResult == true)
{
CustomDialog2 cd2 = new CustomDialog2();
cd2.ShowDialog();
}
Well, anyway that is the gist. The problem is that CustomDialog2 does
not display. I can step over the ShowDialog method and it seems to do
nothing. If I check DialogResult after the call to cd2.ShowDialog() it
is null.
The other thing I did was swap the dialogs over, e.g. displayed
CustomDialog2 then CustomDialog. CustomDialog was the one to fail this
time, so it seems that the second dialog to display will fail. It
doesn't seem to relate to the actual dialog classes
Any ideas?