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 8744425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:50:20+00:00 2026-06-13T11:50:20+00:00

I am using WPF with MVVM. I need some advise on how I can

  • 0

I am using WPF with MVVM. I need some advise on how I can get the progress message to the UI from the following architecture.

UI – File processing window.
ViewModel – Has properties for Message, ProgressValue
The message is bound to the UI textblock to update the ui on what is happening in the background while the user is working on something else.

When the user click Process file, the ViewModel ProcessFile is invoked.

The viewmodel directly does not process any files. It in turn calls a different assembly which does the processing of the file.

Here are the pieces of code (I could not put the actual code here):

XAML:

            <StackPanel>
                <TextBlock Text="{Binding Message}" />
                <ProgressBar MinWidth="250" Height="25" IsIndeterminate="True" />
            </StackPanel>

Currently I have it IsIndeterminate. I will change this to show the percentage complete.

ViewModel

    private string _message;
    public string Message
    {
       get 
       { 
           return _message;
       }
       set 
       { 
           _message=value; 
           OnPropertyChanged("Message");
       }
    }

    private int _progressValue;
    public int ProgressValue
    {
       get { return _progressValue;}
       set 
       { _progressValue=value; 
           OnPropertyChanged("ProgressValue");
       }
    }

    public void StartProcess(string fileName)
    {
       ThreadStart tStart = delegate()
        {
           differentAssembly.StartProcess(string fileName);
        };
        Thread processThread = new Thread(tStart);
        processThread.IsBackground = true;
        processThread.Start();
    }

Now with that said how do I get the progress information from the differentAssembly. This will be a message stating the progress and a percentage.

Thanks for your help.

  • 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-13T11:50:21+00:00Added an answer on June 13, 2026 at 11:50 am

    I had the same question on increasing the progress bar value from different assembly.

    Instead of calling thread which of course have good number of advantages I used the Observable pattern. Which uses the delegates and background worker.

    If I am right we could use Observable pattern with MVVM.

    Let me know if I answered your question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a WPF app using MVVM and need some help. for the
In my WPF application using MVVM I noticed that in some cases the CanExecute
I am coding a WPF application using MVVM pattern. I don't need to have
I have some strange problem in my WPF app. I'm using a MVVM pattern
I'm developing a WPF application using the MVVM pattern and I need to display
I have started to build a WPF application in MVVM architecture (using Prism infrastructure).
I started using WPF (in C#) some weeks ago and now i need help
I'm using WPF MVVM to create a wizard in Excel 2007. The wizard code
I notice that many of the WPF MVVM frameworks seem to avoid using the
I'm working on a WPF project using MVVM and I'm trying to implement a

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.