Example #1
0
 public override void AddSubview(UIView view)
 {
     // As iOS will invoke the MovedToWindow on the 'view' (which will invoke the Loaded event)
     // ** before ** invoking the SubviewAdded on its parent (i.e. this element),
     // we cannot rely only on the cloned collection made in that SubviewAdded callback.
     // Instead we have to pre-update the _shadowChildren so handlers of the Loaded event will be able
     // to properly walk the tree up and down (cf. EffectiveViewport).
     _shadowChildren.Add(view);
     base.AddSubview(view);
 }
Example #2
0
 /// <summary>
 /// Adds a view to the current view group.
 /// </summary>
 /// <remarks>This method does not call the actual AddView method,
 /// but an optimized version of it that does not require a hierarchy
 /// observer.</remarks>
 public new virtual void AddView(View view)
 {
     _childrenShadow.Add(view);
     base.AddViewFast(view);
     OnChildViewAdded(view);
 }