I am trying to change the active index of a multiview by using a delegate and it doesn't work as i expect.
this is my code
protected void ucWaitPage_FinishedWaiting(PerformAfterWaitDelegate performAfterWait)
{
performAfterWait.Invoke();
this.SetIndex();
}
private void SetIndex()
{
this.mvwTest.ActiveViewIndex = 0;
}
The performAfterWait Delegate points to the SetIndex() method.
When the performAfterWait delegate gets invoked SetIndex() gets called but when SetIndex() returns this.mvwTest.ActiveViewIndex reverts to being equal to 1.
However when i call the SetIndex() method directly it sets this.mvwTest.ActiveViewIndex = 0 and the change persists when the method returns.