Dispatcher.Invoke not working in .NET 3.0 SP1 RRS feed

  • Question

  • I am developing a WPF windows application and am getting into a trouble running the app in .NET 3.0. Everytime that I try to access the System.Windows.Threading.Dispatcher.Invoke() method, I get a method-not-found error.

    Basically, I spawn a new thread from the main thread and try to change some UI properties (basically update a progress-bar) from the new thread using the following code:


    updateStatusDelegate usd = new updateStatusDelegate(progressBar.SetValue);

    Dispatcher.Invoke(usd, System.Windows.Threading.DispatcherPriority.Background,
    new object[] { System.Windows.Controls.ProgressBar.ValueProperty, Convert.ToDouble(perc) });

    Can someone help me understand why do I encounter this error in .net 3.0? I am able to get this going in .NET 3.0 SP2. But I guess .NET 3.0SP2 is not distributed independantly and is packaged only with .NET 3.5 version. My goal is to get away with the dependancy of .net 3.5 and have a dependancy on .NET 3.0 version


    Any help would be appreciated.



    Monday, May 24, 2010 12:05 PM