WPF Section Status

I have a wpf application, it takes ~ 30 seconds to create a map / graphic. I read that there is no easy way to link to the visualization stream of the user interface in order to get an update of the progress. So I was going to use a counter for a value converter that changes my map, but this also relates to the user interface theme, so my question is, did anyone find any spotty methods for working with the rendering stream yet?

Thank.

+3
source share
4 answers

You can create your own map / graphic in BackgroundWorker , which allows you to call ReportProgress in your function, where you can set your completion percentage and raise the ProgressChanged event to update your user interface.

+3
source

When you say UI play stream, do you mean hidden rendering stream from internal WPF elements or UI stream?

In any case, having a separate thread that builds your map and notifies the user interface of progress will not help you?

0
source

im , , .

- , 300 ( 200 ) . ( , )

, , WPF.

. , , . ( , , , ).

    delegate void UpdateUIThreadDelegate(String str);

    public void DisplayString(String strMessage)
    {
            if (this.InvokeRequired)
            {
                UpdateUIThreadDelegate updateDelegate = DisplayString;

                this.BeginInvoke(updateDelegate, strMessage);

                return;
            }

            myTextBox.Text = strMessage;
    }

0

, , , "IsAsync = True" , .

( , ) , PriorityBinding

0

Source: https://habr.com/ru/post/1734072/


All Articles