0

I have several Wait calls in a program since it does a few service calls, all of them work except one.. Here is an example of a working cursor of how I am setting it.

    private void btnSaveTask_Click(object sender, RoutedEventArgs e)
    {
        this.Cursor = Cursors.Wait;
        test.save();
        this.Cursor = Cursors.Arrow;
    }

and now the none working

    private async void test(object sender, EventArgs e)
    {
        this.Cursor = Cursors.Wait;
        test.Visibility = System.Windows.Visibility.Visible;

        await Control.Initialize();
        File.IsOpen = false;
        Edit.IsSelected = true;
        this.Cursor = Cursors.Arrow;
    }

is it because of the async? and if so, how would i go about making it actually show a wait cursor for that method call since the time for it to run that full method and initialize can vary between 2-5 seconds.

Im also using WPF

Robin Q
  • 62
  • 1
  • 9
  • 1
    possible duplicate of [Cursor.Current vs. this.Cursor](http://stackoverflow.com/questions/302663/cursor-current-vs-this-cursor) – Hans Passant Jan 08 '14 at 17:03
  • 1
    By "not working", do you mean the cursor stays as the `Wait` cursor? – Sven Grosen Jan 08 '14 at 17:05
  • the cursor in the debugger changes to wait and arrow whenever the line is being called, but the cursor itself does not change to anything. – Robin Q Jan 08 '14 at 17:42

0 Answers0