Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8738753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:47:41+00:00 2026-06-13T10:47:41+00:00

I have a project based WPF and MVVM. My project is based on a

  • 0

I have a project based WPF and MVVM.
My project is based on a wizard containing a content control which shows my views (User Controls)
I want to execute a command after the view is loaded completely, I would like the user to see the view UI immediately after the command will be executed.

I tried using :

<i:Interaction.Triggers>
    <i:EventTrigger EventName="Loaded">
        <i:InvokeCommandAction Command="{Binding StartProgressCommand}"/>
    </i:EventTrigger>
</i:Interaction.Triggers>

But the command is executed before I see the view UI and it’s not what I’m looking for.

Does anyone have an idea how should I need to implement it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:47:42+00:00Added an answer on June 13, 2026 at 10:47 am

    That’s because even though technically the view is loaded (i.e: all the components are ready in memory), your app is not idle yet, and thus the UI isn’t refreshed yet.

    Setting a command using interaction triggers on the Loaded event is already good, as there is no better event to attach to.
    Now to really wait until the UI is shown, do this in your StartProgress() (I’m assuming here that this is the name of the method that StartProgressCommand point to):

    public void StartProgress()
    {
        new DispatcherTimer(//It will not wait after the application is idle.
                           TimeSpan.Zero,
                           //It will wait until the application is idle
                           DispatcherPriority.ApplicationIdle, 
                           //It will call this when the app is idle
                           dispatcherTimer_Tick, 
                           //On the UI thread
                           Application.Current.Dispatcher); 
    }
    
    private static void dispatcherTimer_Tick(object sender, EventArgs e)
    {
        //Now the UI is really shown, do your computations
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on project that based on WPF and MVVM. I have some UserControl
In my WPF project I have a custom control which is visually represented by
I have composite project which contains: C++ library for Linux/Windows, C++/CLI library based on
In my project I have a grid view which contains images. Based on my
I have a Maven based Spring-WS client project that I want to package as
I am trying to implement MVVM in a new project (based on WPF &
I am new to WPF and custom controls. I have implemented a custom control
if try implemnt my first MVVM in WPF app. I have old app based
I am using Microsoft Visual Basic 2010 Express. I have a WPF-based project. I
I am currently working on a C# WPF project. I have a list which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.