예제 #1
0
        protected override void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            _disposed = true;

            if (disposing)
            {
                // Unhook the adapter from the ListView before disposing of it
                if (Control != null)
                {
                    Control.Adapter = null;
                }

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


            base.Dispose(disposing);
        }
예제 #2
0
        protected override void OnElementChanged(ElementChangedEventArgs <TableView> e)
        {
            base.OnElementChanged(e);

            AListView listView = Control;

            if (listView == null)
            {
                listView = CreateNativeControl();
                SetNativeControl(listView);
            }

            listView.Focusable = false;
            listView.DescendantFocusability = DescendantFocusability.AfterDescendants;

            TableView view = e.NewElement;

            _adapter         = GetModelRenderer(listView, view);
            listView.Adapter = _adapter;
        }