I am a C++ developer. Xamarin and C# is new for me. I was using NSProgressIndicator to display progress of process. For this I had set minimum and maximum value and incrementing progressValue by 1 in each loop cycle. For example
var progressBar = new NSProgressIndicator (new CGRect (60, 0, 500, 300))
{
DoubleValue = 0,
Indeterminate = false
}
double progressValue = 0;
progressBar.MinValue = 0;
progressBar.MaxValue = 228;//it can be any integer value.
while(progressValue < progressBar.MaxValue)
{
progressValue += 1;
progressBar.DoubleValue = progressValue;
mainWinController.Window.ContentView.AddSubview (progressIndicator);
}
//mainWinController.Window.ContentView.AddSubview (progressIndicator);
In above logic I am running my while loop till MaxValue of NSProgressIndicator and in every running step of loop incrementing progressValue by 1. But Progress indicator is displaying few increment and not being complete. According to logic it must be complete as loop is running 228(MaxValue) times.