- childLayout.ConditionForAnimation = childLayout.ConditionForAnimation | TransitionCondition.Remove;
- // Add LayoutItem to the transition stack so can animate it out.
- Window.Instance.LayoutController.AddTransitionDataEntry(new LayoutData(layoutItem, ConditionForAnimation, 0,0,0,0));
+
+ if (LayoutWithTransition)
+ {
+ if (!childLayout.IsReplaceFlag())
+ {
+ Window.Instance.LayoutController.AddToRemovalStack(childLayout);
+ }
+
+ childLayout.ConditionForAnimation = childLayout.ConditionForAnimation | TransitionCondition.Remove;
+ // Add LayoutItem to the transition stack so can animate it out.
+ Window.Instance.LayoutController.AddTransitionDataEntry(new LayoutData(layoutItem, ConditionForAnimation, 0, 0, 0, 0));
+ }
+ else
+ {
+ Interop.Actor.Actor_Remove(View.getCPtr(childLayout.Owner.Parent), View.getCPtr(childLayout.Owner));
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+