コード例 #1
0
        /// <summary>
        /// Dispose the specified disposing.
        /// </summary>
        /// <returns>The dispose.</returns>
        /// <param name="disposing">If set to <c>true</c> disposing.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_command != null)
                {
                    _command.CanExecuteChanged -= Command_CanExecuteChanged;
                }
                Execute  = null;
                _command = null;
                _indicatorView?.RemoveFromParent();
                _indicatorView?.SetImageDrawable(null);
                _indicatorView?.SetImageBitmap(null);
                _indicatorView?.Dispose();
                _indicatorView = null;

                _coreView?.RemoveFromParent();
                _coreView?.Dispose();
                _coreView = null;

                _container?.RemoveFromParent();
                _container?.Dispose();
                _container = null;
            }
            base.Dispose(disposing);
        }
コード例 #2
0
        protected override void CreateContentView()
        {
            base.CreateContentView();

            _container = new FormsViewContainer(Context);


            _coreView = FindViewById <LinearLayout>(Resource.Id.CellBody);
            ContentStack.RemoveFromParent();
            DescriptionLabel.RemoveFromParent();

            if (CustomCell.UseFullSize)
            {
                IconView.RemoveFromParent();
                var layout  = FindViewById <ARelativeLayout>(Resource.Id.CellLayout);
                var rMargin = CustomCell.ShowArrowIndicator ? _Context.ToPixels(10) : 0;
                layout.SetPadding(0, 0, (int)rMargin, 0);
                _coreView.SetPadding(0, 0, 0, 0);
            }

            _coreView.AddView(_container);
        }