Ejemplo n.º 1
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                CellBase.PropertyChanged   -= CellPropertyChanged;
                CellParent.PropertyChanged -= ParentPropertyChanged;
                CellButton1.Click          -= CellButton1_Click;
                CellButton2.Click          -= CellButton2_Click;
                CellButton3.Click          -= CellButton3_Click;

                if (CellBase.Section != null)
                {
                    CellBase.Section.PropertyChanged -= SectionPropertyChanged;
                    CellBase.Section = null;
                }

                CellTitle?.Dispose();
                CellTitle = null;
                CellTitleContent?.Dispose();
                CellTitleContent = null;
                CellAccessory?.Dispose();
                CellAccessory = null;
                CellButton1?.Dispose();
                CellButton1 = null;
                CellButton2?.Dispose();
                CellButton2 = null;
                CellButton3?.Dispose();
                CellButton3 = null;
                CellButtonContent?.Dispose();
                CellButtonContent = null;
                CellContent?.Dispose();
                CellContent = null;
                Cell        = null;

                _iconTokenSource?.Dispose();
                _iconTokenSource = null;
                _Context         = null;

                _backgroundColor?.Dispose();
                _backgroundColor = null;
                _selectedColor?.Dispose();
                _selectedColor = null;
                _ripple?.Dispose();
                _ripple = null;

                Background?.Dispose();
                Background = null;
            }
            base.Dispose(disposing);
        }
Ejemplo n.º 2
0
 private void UpdateTitleColor()
 {
     if (CellBase.TitleColor != Color.Default)
     {
         CellTitle.SetTextColor(CellBase.TitleColor.ToAndroid());
     }
     else if (CellParent != null && CellParent.CellTitleColor != Color.Default)
     {
         CellTitle.SetTextColor(CellParent.CellTitleColor.ToAndroid());
     }
     else
     {
         CellTitle.SetTextColor(_defaultTextColor);
     }
 }
Ejemplo n.º 3
0
 private void UpdateTitleFontSize()
 {
     if (CellBase.TitleFontSize > 0)
     {
         CellTitle.SetTextSize(ComplexUnitType.Sp, (float)CellBase.TitleFontSize);
     }
     else if (CellParent != null)
     {
         CellTitle.SetTextSize(ComplexUnitType.Sp, (float)CellParent.CellTitleFontSize);
     }
     else
     {
         CellTitle.SetTextSize(ComplexUnitType.Sp, _defaultFontSize);
     }
 }
Ejemplo n.º 4
0
        void ReleaseDesignerOutlets()
        {
            if (CellTitle != null)
            {
                CellTitle.Dispose();
                CellTitle = null;
            }

            if (imgIndicator != null)
            {
                imgIndicator.Dispose();
                imgIndicator = null;
            }

            if (profileImage != null)
            {
                profileImage.Dispose();
                profileImage = null;
            }
        }