diff --git a/UICatalog/Scenarios/Progress.cs b/UICatalog/Scenarios/Progress.cs index 4a106f333..d7b10595e 100644 --- a/UICatalog/Scenarios/Progress.cs +++ b/UICatalog/Scenarios/Progress.cs @@ -164,10 +164,8 @@ namespace UICatalog { protected override void Dispose (bool disposing) { - Win.GetEnumerator ().Reset (); - while (Win.GetEnumerator ().MoveNext ()) { - var cur = (ProgressDemo)Win.GetEnumerator ().Current; - cur?.StopBtnClick (); + foreach (var v in Win.Subviews.OfType()) { + v?.StopBtnClick (); } base.Dispose (disposing); }