Esempio n. 1
0
        public override void WillRemoveSubview(UIView uiview)
        {
            base.WillRemoveSubview(uiview);

            var position = _shadowChildren.IndexOf(uiview, ReferenceEqualityComparer <UIView> .Default);

            if (position != -1)
            {
                _shadowChildren.RemoveAt(position);
            }
        }
Esempio n. 2
0
        public override void WillRemoveSubview(UIView uiview)
        {
            // cf. AddSubview comment!
            var index = _shadowChildren.IndexOf(uiview, ReferenceEqualityComparer <UIView> .Default);

            if (index != -1)
            {
                _shadowChildren.RemoveAt(index);
            }

            base.WillRemoveSubview(uiview);
        }
Esempio n. 3
0
        /// <summary>
        /// Removes a view from the current view group using a position index.
        /// </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 RemoveViewAt(int index)
        {
            var removedView = _childrenShadow[index];

            if (FeatureConfiguration.FrameworkElement.AndroidUseManagedLoadedUnloaded)
            {
                if (removedView is FrameworkElement fe)
                {
                    fe.IsManagedLoaded = false;
                    fe.PerformOnUnloaded();
                }
            }

            _childrenShadow.RemoveAt(index);
            base.RemoveViewAtFast(index);

            ResetDependencyObjectParent(removedView);
        }