Search This Blog

Tuesday, November 8, 2016

How to show a specific View at application startup, right after the logon window or after loading the main window

I have recently updated my old KB article with several solutions and wanted to bring this for your information:


Here is the information on typical scenarios to get a better understanding of where this article can be applied: 

"One may want to show a dialog view at startup (after logging in). Typically, this view appears after the successful logon and allows a user to select or edit personal or global settings such as current password, company, currency, language, etc. Also, it may be often required to display this View as modal before a user can access the navigation menu or any other forms in the application. In other scenarios, it may be required to display a kind of notifications popup right after loading the main window, with unread messages, active orders, etc."





As always, it would be great to hear whether you are already using these techniques (specify approach #) in your XAF apps or you had to invent new solutions for a similar task. I am looking forward to hearing from you in the comments.


9 comments:

  1. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Thx for the Post Dennis. I will have the need for something similar in the near future. our users want to define several Startup Navigation items, not just an single one. They want an predefined set of listviews which should open after Login.

      Delete
    2. Am I correct that a ListView should pop up one by one right after closing the other or how they want to show several items? I am also thinking whether a wizard-like form would not be a better choice as far as UX is concerned...

      Delete
    3. Not really Dennis - we use Tabbed MDI - so instead of opening an single Tab we want to Show several Tabs after Login.

      Delete
    4. Thanks for your clarification - I will consider updating the KB with a possible solution for the future

      Delete
  2. We are doing this, it is a while since I implemented it but I tried at least some of the examples in thelink, but ultimately went with a different approach.

    Our requirement is to show a popup window on top of the main application window immediately after it has started.

    We achieved this by overriding MdiShowViewStrategy.ShowStartupWindowCore like:

    protected override WinWindow ShowStartupWindowCore()
    {
    WinWindow window = base.ShowStartupWindowCore();
    ((WinApplication)Application).StopSplash(); // stop splash here otherwise it stays open if a modal dialog is subsequently opened

    //show the popup window

    return window;
    }

    ReplyDelete
    Replies
    1. Thanks for sharing your experience, Wade. Yes, this solution is technically fine, though, in my opinion, it is more difficult to implement and maintain.

      Delete
  3. Such sites are important because they provide a large dose of useful information ... price converter

    ReplyDelete