void UpdateFlyoutHeader()
        {
            var header = ((IShellController)_shellContext.Shell).FlyoutHeader;

            if (header == _headerView?.View)
            {
                return;
            }

            if (_headerView != null)
            {
                _tableViewController.HeaderView = null;
                _headerView.RemoveFromSuperview();
                _headerView.Dispose();
            }

            if (header != null)
            {
                _headerView = new UIContainerView(((IShellController)_shellContext.Shell).FlyoutHeader);
            }
            else
            {
                _headerView = null;
            }

            _tableViewController.HeaderView = _headerView;

            if (_headerView != null)
            {
                View.AddSubview(_headerView);
            }
        }
        void UpdateFlyoutHeader()
        {
            var header = ((IShellController)_shellContext.Shell).FlyoutHeader;

            if (header == _headerView?.View)
            {
                return;
            }

            int previousIndex = GetPreviousIndex(_headerView);

            if (_headerView != null)
            {
                _tableViewController.HeaderView = null;
                _headerView.RemoveFromSuperview();
                _headerView.Dispose();
            }

            if (header != null)
            {
                _headerView = new UIContainerView(((IShellController)_shellContext.Shell).FlyoutHeader);
            }
            else
            {
                _headerView = null;
            }

            _uIViews[HeaderIndex] = _headerView;
            AddViewInCorrectOrder(_headerView, previousIndex);
            _tableViewController.HeaderView = _headerView;
        }
 public ShellTableViewController(IShellContext context, UIContainerView headerView, Action <Element> onElementSelected)
 {
     _context                       = context;
     _headerView                    = headerView;
     _source                        = new ShellTableViewSource(context, onElementSelected);
     _source.ScrolledEvent         += OnScrolled;
     _headerView.HeaderSizeChanged += OnHeaderSizeChanged;
     ((IShellController)_context.Shell).StructureChanged += OnStructureChanged;
 }
        public ShellTableViewController(IShellContext context, UIContainerView headerView, Action <Element> onElementSelected)
        {
            _context               = context;
            _onElementSelected     = onElementSelected;
            _headerView            = headerView;
            _source                = CreateShellTableViewSource();
            _source.ScrolledEvent += OnScrolled;
            if (_headerView != null)
            {
                _headerView.HeaderSizeChanged += OnHeaderSizeChanged;
            }
            ((IShellController)_context.Shell).StructureChanged += OnStructureChanged;

            _context.Shell.PropertyChanged += OnShellPropertyChanged;
        }
        public ShellFlyoutContentRenderer(IShellContext context)
        {
            var header = ((IShellController)context.Shell).FlyoutHeader;

            if (header != null)
            {
                _headerView = new UIContainerView(((IShellController)context.Shell).FlyoutHeader);
            }
            _tableViewController = new ShellTableViewController(context, _headerView, OnElementSelected);

            AddChildViewController(_tableViewController);

            context.Shell.PropertyChanged += HandleShellPropertyChanged;

            _shellContext = context;
        }
        public ShellFlyoutContentRenderer(IShellContext context)
        {
            _shellContext = context;

            var header = ((IShellController)context.Shell).FlyoutHeader;

            if (header != null)
            {
                _headerView = new UIContainerView(((IShellController)context.Shell).FlyoutHeader);
            }

            _tableViewController = CreateShellTableViewController();

            AddChildViewController(_tableViewController);

            context.Shell.PropertyChanged += HandleShellPropertyChanged;
        }
Beispiel #7
0
 public ShellTableViewController(IShellContext context, UIContainerView headerView, Action <Element> onElementSelected) : this(context, onElementSelected)
 {
     ShellFlyoutContentManager = new ShellFlyoutLayoutManager(context);
     HeaderView = headerView;
 }
Beispiel #8
0
 public ShellTableViewController(IShellContext context, UIContainerView headerView, Action <Element> onElementSelected) : this(context, onElementSelected)
 {
     HeaderView = headerView;
 }