User popup window before Prism 7.1 window is loaded - how?
up vote
0
down vote
favorite
I'm using Prism 7.1 WPF and Prism Unity.
Before the main <prism:PrismApplication/>
runs, or when the main Prism window appears, I want to have a modal pop-up window for user to input some data.
The input data would be for user login, and, more importantly, to determine which Prism modules to load into the application.
How would I go about doing this? I have tried to display a custom WPF window in the following PrismApplication
overload methods, but either the window doesn't appear, or the entire application closes:
public partial class App : PrismApplication
protected override void OnStartup(StartupEventArgs e)
base.OnStartup(e);
protected override IModuleCatalog CreateModuleCatalog()
return base.CreateModuleCatalog();
protected override void RegisterTypes(IContainerRegistry containerRegistry)
protected override Window CreateShell()
return ServiceLocator.Current.GetInstance<MainWindow>();
protected override void OnInitialized()
base.OnInitialized();
For example, if I put in a call to display a custom WPF window in the CreateModuleCatalog(), it will show, however the entire application closes:
protected override IModuleCatalog CreateModuleCatalog()
LoginWindow loginWindow = new LoginWindow();
if (loginWindow.ShowDialog() == true)
// OK
else
// Cancel
return base.CreateModuleCatalog();
... and if I put the call in OnStartup(), it won't show until all the other overrides are executed and the main Prism window is displayed (which is too late to process the user's input):
protected override void OnStartup(StartupEventArgs e)
base.OnStartup(e);
LoginWindow loginWindow = new LoginWindow();
if (loginWindow.ShowDialog() == true)
// OK
else
// Cancel
I've played around with the different methods, changed the position of the calls to the base class's method etc, but can't seem to get it working. Can anyone suggest how this can be done?
The reason for this is that I don't want to load entire modules into the application if I don't need to (based upon the user input).
Thanks....
c# wpf prism-7
add a comment |
up vote
0
down vote
favorite
I'm using Prism 7.1 WPF and Prism Unity.
Before the main <prism:PrismApplication/>
runs, or when the main Prism window appears, I want to have a modal pop-up window for user to input some data.
The input data would be for user login, and, more importantly, to determine which Prism modules to load into the application.
How would I go about doing this? I have tried to display a custom WPF window in the following PrismApplication
overload methods, but either the window doesn't appear, or the entire application closes:
public partial class App : PrismApplication
protected override void OnStartup(StartupEventArgs e)
base.OnStartup(e);
protected override IModuleCatalog CreateModuleCatalog()
return base.CreateModuleCatalog();
protected override void RegisterTypes(IContainerRegistry containerRegistry)
protected override Window CreateShell()
return ServiceLocator.Current.GetInstance<MainWindow>();
protected override void OnInitialized()
base.OnInitialized();
For example, if I put in a call to display a custom WPF window in the CreateModuleCatalog(), it will show, however the entire application closes:
protected override IModuleCatalog CreateModuleCatalog()
LoginWindow loginWindow = new LoginWindow();
if (loginWindow.ShowDialog() == true)
// OK
else
// Cancel
return base.CreateModuleCatalog();
... and if I put the call in OnStartup(), it won't show until all the other overrides are executed and the main Prism window is displayed (which is too late to process the user's input):
protected override void OnStartup(StartupEventArgs e)
base.OnStartup(e);
LoginWindow loginWindow = new LoginWindow();
if (loginWindow.ShowDialog() == true)
// OK
else
// Cancel
I've played around with the different methods, changed the position of the calls to the base class's method etc, but can't seem to get it working. Can anyone suggest how this can be done?
The reason for this is that I don't want to load entire modules into the application if I don't need to (based upon the user input).
Thanks....
c# wpf prism-7
Try to show the login window using theShowDialog()
method in theInitializeShell
method of the bootstrapper.
– mm8
Nov 13 at 10:12
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm using Prism 7.1 WPF and Prism Unity.
Before the main <prism:PrismApplication/>
runs, or when the main Prism window appears, I want to have a modal pop-up window for user to input some data.
The input data would be for user login, and, more importantly, to determine which Prism modules to load into the application.
How would I go about doing this? I have tried to display a custom WPF window in the following PrismApplication
overload methods, but either the window doesn't appear, or the entire application closes:
public partial class App : PrismApplication
protected override void OnStartup(StartupEventArgs e)
base.OnStartup(e);
protected override IModuleCatalog CreateModuleCatalog()
return base.CreateModuleCatalog();
protected override void RegisterTypes(IContainerRegistry containerRegistry)
protected override Window CreateShell()
return ServiceLocator.Current.GetInstance<MainWindow>();
protected override void OnInitialized()
base.OnInitialized();
For example, if I put in a call to display a custom WPF window in the CreateModuleCatalog(), it will show, however the entire application closes:
protected override IModuleCatalog CreateModuleCatalog()
LoginWindow loginWindow = new LoginWindow();
if (loginWindow.ShowDialog() == true)
// OK
else
// Cancel
return base.CreateModuleCatalog();
... and if I put the call in OnStartup(), it won't show until all the other overrides are executed and the main Prism window is displayed (which is too late to process the user's input):
protected override void OnStartup(StartupEventArgs e)
base.OnStartup(e);
LoginWindow loginWindow = new LoginWindow();
if (loginWindow.ShowDialog() == true)
// OK
else
// Cancel
I've played around with the different methods, changed the position of the calls to the base class's method etc, but can't seem to get it working. Can anyone suggest how this can be done?
The reason for this is that I don't want to load entire modules into the application if I don't need to (based upon the user input).
Thanks....
c# wpf prism-7
I'm using Prism 7.1 WPF and Prism Unity.
Before the main <prism:PrismApplication/>
runs, or when the main Prism window appears, I want to have a modal pop-up window for user to input some data.
The input data would be for user login, and, more importantly, to determine which Prism modules to load into the application.
How would I go about doing this? I have tried to display a custom WPF window in the following PrismApplication
overload methods, but either the window doesn't appear, or the entire application closes:
public partial class App : PrismApplication
protected override void OnStartup(StartupEventArgs e)
base.OnStartup(e);
protected override IModuleCatalog CreateModuleCatalog()
return base.CreateModuleCatalog();
protected override void RegisterTypes(IContainerRegistry containerRegistry)
protected override Window CreateShell()
return ServiceLocator.Current.GetInstance<MainWindow>();
protected override void OnInitialized()
base.OnInitialized();
For example, if I put in a call to display a custom WPF window in the CreateModuleCatalog(), it will show, however the entire application closes:
protected override IModuleCatalog CreateModuleCatalog()
LoginWindow loginWindow = new LoginWindow();
if (loginWindow.ShowDialog() == true)
// OK
else
// Cancel
return base.CreateModuleCatalog();
... and if I put the call in OnStartup(), it won't show until all the other overrides are executed and the main Prism window is displayed (which is too late to process the user's input):
protected override void OnStartup(StartupEventArgs e)
base.OnStartup(e);
LoginWindow loginWindow = new LoginWindow();
if (loginWindow.ShowDialog() == true)
// OK
else
// Cancel
I've played around with the different methods, changed the position of the calls to the base class's method etc, but can't seem to get it working. Can anyone suggest how this can be done?
The reason for this is that I don't want to load entire modules into the application if I don't need to (based upon the user input).
Thanks....
c# wpf prism-7
c# wpf prism-7
asked Nov 10 at 3:56
Jack
907
907
Try to show the login window using theShowDialog()
method in theInitializeShell
method of the bootstrapper.
– mm8
Nov 13 at 10:12
add a comment |
Try to show the login window using theShowDialog()
method in theInitializeShell
method of the bootstrapper.
– mm8
Nov 13 at 10:12
Try to show the login window using the
ShowDialog()
method in the InitializeShell
method of the bootstrapper.– mm8
Nov 13 at 10:12
Try to show the login window using the
ShowDialog()
method in the InitializeShell
method of the bootstrapper.– mm8
Nov 13 at 10:12
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53235878%2fuser-popup-window-before-prism-7-1-window-is-loaded-how%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Try to show the login window using the
ShowDialog()
method in theInitializeShell
method of the bootstrapper.– mm8
Nov 13 at 10:12