Ejemplo n.º 1
0
        protected override void OnDetached()
        {
            var renderer = Container as IVisualElementRenderer;

            if (renderer?.Element != null)
            {
                NativeButton.Background                = OrgBackground;
                NativeButton.StateListAnimator         = OrgStateListAnimator;
                NativeButton.SupportBackgroundTintList = OrgBackgroundTint;
            }
            Colors.Dispose();
            Shape.Dispose();
            Inset.Dispose();
            Ripple.Dispose();

            FormsButton          = null;
            NativeButton         = null;
            OrgBackground        = null;
            OrgStateListAnimator = null;
            OrgBackgroundTint    = null;

            Colors = null;
            Shape  = null;
            Ripple = null;
            Inset  = null;
        }
        protected override void OnDetached()
        {
            if (!IsDisposed)
            {
                NativeButton.Background        = OrgBackground;
                NativeButton.StateListAnimator = OrgStateListAnimator;
                System.Diagnostics.Debug.WriteLine($"{this.GetType().FullName} Detached Disposing");
            }
            Colors.Dispose();
            Shape.Dispose();
            Inset.Dispose();
            Ripple.Dispose();

            FormsButton          = null;
            NativeButton         = null;
            OrgBackground        = null;
            OrgStateListAnimator = null;

            Colors = null;
            Shape  = null;
            Ripple = null;
            Inset  = null;
            System.Diagnostics.Debug.WriteLine($"{this.GetType().FullName} Detached completely");

            base.OnDetached();
        }
Ejemplo n.º 3
0
        protected override void OnDetached()
        {
            if (!IsDisposed)
            {
                NativeButton.Background        = OrgBackground;
                NativeButton.StateListAnimator = OrgStateListAnimator;
            }
            Colors.Dispose();
            Shape.Dispose();
            Inset.Dispose();
            Ripple.Dispose();

            FormsButton          = null;
            NativeButton         = null;
            OrgBackground        = null;
            OrgStateListAnimator = null;

            Colors = null;
            Shape  = null;
            Ripple = null;
            Inset  = null;
        }