ProgresBarr - wait cursor

Hi, I need to set. when I click on the button i need "waiting cursor" to be shown.
I created this code, but it does not work the way it is.
The cursor jumps after the data is loaded. Can anyone please help with how to do the wait cursor
Thank you NR

    probar = FindViewById<ProgressBar>(Resource.Id.progressBar1);
        btUdrzba.Click += delegate
        {

            int inkr = 0;

            probar.Visibility = ViewStates.Visible;
             new Thread(new ThreadStart(() => {
                while (inkr < 100)
                {
                     inkr += 5;                    
                  Thread.Slep(100);                 
                }
                RunOnUiThread(() => { probar.Visibility = ViewStates.Invisible; });

            })).Start();


            using (var wb_udrz = new WebClient())
            {
                var response = wb_udrz.DownloadString("ip_Adr/api/udrzba");                   

                List<Dictionary<string, string>> obj = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(response);
                METNAPLNLIST_2(obj);               
            }               

        };
Sign In or Register to comment.