Fix visual aritfacts
authorLukasz Stanislawski <l.stanislaws@samsung.com>
Fri, 13 Mar 2020 16:13:44 +0000 (17:13 +0100)
committerLukasz Stanislawski/IoT & UI Sample (PLT) /SRPOL/Engineer/Samsung Electronics <l.stanislaws@samsung.com>
Tue, 17 Mar 2020 11:30:25 +0000 (12:30 +0100)
When inheriting from Control the rendering artifacts
appers during mount & touch events.

As inheriting strictly from Control is not required use View instead.

Oobe/Oobe/Controls/ViewStack.cs

index be63b24..d0fd7a0 100644 (file)
@@ -10,7 +10,7 @@ namespace Oobe.Controls
     /// ViewStack implemenents stack based navigation in which all child views are stacked over each other
     /// and only the most recent child added is visible.
     /// </summary>
-    public class ViewStack : Control
+    public class ViewStack : View
     {
         private class ViewStackBaseCustomLayout : LayoutGroup
         {
@@ -130,17 +130,8 @@ namespace Oobe.Controls
             FinishAnimations();
             RemoveAllDelayedViews();
             Add(view);
-            StartPageEnterAnimation(Previous, Current);
-        }
-
-        public override void OnChildRemove(View view)
-        {
-            views.Remove(view);
-        }
-
-        public override void OnChildAdd(View view)
-        {
             views.Add(view);
+            StartPageEnterAnimation(Previous, Current);
         }
 
         private void AddViewToDelayRemove(View view)