Ticket T259255
Visible to All Users

Automatically display view at the first time running application

created 10 years ago

Dear Sir,

I am using DashboardView to create Welcome screen. How to display this screen automatically at the frist time, if application start running?

Many Thanks & Best Regards,
Hari Setyawan

Answers approved by DevExpress Support

created 10 years ago (modified 9 years ago)

Hello,

You can set the StartupNavigationItem property for the NavigationItems node in the Model Editor. You can also update this property in code by handling the XafApplication.LoggedOn or XafApplication.UserDifferencesLoaded events, e.g.:

C#
using DevExpress.ExpressApp.SystemModule; using System.Linq; ... private void MainDemoWinApplication_LoggedOn(object sender, LogonEventArgs e) { XafApplication app = (XafApplication)sender; IModelApplicationNavigationItems navigationItems = (IModelApplicationNavigationItems)app.Model; string targetViewId = "Department_ListView"; IModelNavigationItem targetNavigationItem = navigationItems.NavigationItems.AllItems.FirstOrDefault( item => item.View != null & item.View.Id == targetViewId); if(targetNavigationItem != null) { navigationItems.NavigationItems.StartupNavigationItem = targetNavigationItem; } } ...

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.