Beispiel #1
0
        void CreateMoreToolbar()
        {
            if (_more != null)
            {
                return;
            }

            _more = new ShellMoreToolbar(this);
            _more.Show();
            _drawer = new Panel(Forms.NativeParent);
            _drawer.SetScrollable(true);
            _drawer.SetScrollableArea(1.0);
            _drawer.Direction = PanelDirection.Bottom;
            _drawer.IsOpen    = false;
            _drawer.SetContent(_more, true);
            _drawer.Show();
            Control.PackEnd(_drawer);
        }
        public ShellItemRenderer(IFlyoutController flyoutController, ShellItem item)
        {
            _flyoutController           = flyoutController;
            _shellItem                  = item;
            _shellItem.PropertyChanged += OnShellItemPropertyChanged;
            (_shellItem.Items as INotifyCollectionChanged).CollectionChanged += OnShellItemsCollectionChanged;

            _box = new Native.Box(Forms.NativeParent);
            _box.LayoutUpdated += OnLayoutUpdated;
            _box.Show();

            // Create Tabs
            _tabs = CreateTabs();
            _tabs.TargetView.Show();
            Control.PackEnd(_tabs as EvasObject);
            InitializeTabs();

            // Create More Tabs
            _more = CreateMoreToolbar();
            _more.Show();

            _drawer = CreateDrawer();
            _drawer.Show();
            Control.PackEnd(_drawer);
            InitialzeDrawer(_more);

            ResetToolbarItems();

            UpdateCurrentShellSection(_shellItem.CurrentItem);
            if (_drawer != null)
            {
                _currentSection?.StackBelow(_drawer);
            }

            ((IShellController)_shellItem.Parent).AddAppearanceObserver(this, _shellItem);
        }