Beispiel #1
0
        public void SetDrawerContent(EvasObject content)
        {
            if (content == null)
            {
                UnsetDrawerContent();
                return;
            }

            _drawerContent = content;
            _drawerContent.Show();
            _drawerContentBox.PackEnd(_drawerContent);

            _drawerContentBox.Show();
            _drawerIconBox.Show();

            if (_drawerContent is NavigationView nv)
            {
                nv.Dragged += (s, e) =>
                {
                    if (e.State == DraggedState.EdgeTop)
                    {
                        Close();
                    }
                };
            }
        }
Beispiel #2
0
        void UpdateCurrentItem(ShellContent content)
        {
            if (_currentContent != null)
            {
                _currentContent.Hide();
                _contentArea.UnPack(_currentContent);
                _currentContent = null;
            }

            if (content == null)
            {
                return;
            }

            if (!_contentCache.ContainsKey(content))
            {
                var native = CreateShellContent(content);
                native.SetAlignment(-1, -1);
                native.SetWeight(1, 1);
                _contentCache[content] = native;
            }
            _currentContent = _contentCache[content];
            _currentContent.Show();
            _contentArea.PackEnd(_currentContent);
        }
Beispiel #3
0
 public static void SetOverlay(this Window window, EvasObject content)
 {
     content?.SetAlignment(-1, -1);
     content?.SetWeight(1, 1);
     content?.Show();
     window.AddResizeObject(content);
 }
Beispiel #4
0
 void UpdateTopView()
 {
     if (_lastTop != InternalStack.LastOrDefault())
     {
         _lastTop?.Hide();
         _lastTop = InternalStack.LastOrDefault();
         _lastTop.Show();
     }
 }
Beispiel #5
0
 void UpdateTopView()
 {
     if (_lastTop != InternalStack.LastOrDefault())
     {
         _lastTop?.Hide();
         _lastTop = InternalStack.LastOrDefault();
         _lastTop.Show();
         (_lastTop as Widget)?.SetFocus(true);
     }
 }
Beispiel #6
0
 public static void UpdateVisibility(this EvasObject platformView, IView view)
 {
     if (view.Visibility.ToPlatformVisibility())
     {
         platformView.Show();
     }
     else
     {
         platformView.Hide();
     }
 }
Beispiel #7
0
        public void SetMainContent(EvasObject content)
        {
            if (content == null)
            {
                UnsetMainContent();
                return;
            }

            _content = content;
            _content.Show();
            _contentBox.PackEnd(_content);
            _content.Geometry = _contentBox.Geometry;
        }
 void UpdateTopView()
 {
     if (CurrentView != InternalStack.LastOrDefault())
     {
         if (!IsPreviousViewVisible)
         {
             CurrentView?.Hide();
         }
         CurrentView = InternalStack.LastOrDefault();
         CurrentView?.Show();
         (CurrentView as Widget)?.SetFocus(true);
     }
 }
 protected override void OnElementChanged(ElementChangedEventArgs <OverlayMediaView> e)
 {
     if (Control == null)
     {
         SetNativeControl(new LayoutCanvas(Xamarin.Forms.Forms.NativeParent));
         Control.LayoutUpdated += (s, evt) => OnLayout();
         _overlayHolder         = new ElmSharp.Rectangle(Xamarin.Forms.Forms.NativeParent)
         {
             Color = EColor.Transparent
         };
         _overlayHolder.Show();
         Control.Children.Add(_overlayHolder);
         Control.AllowFocus(true);
         MakeTransparent();
     }
     base.OnElementChanged(e);
 }
        void UpdateMain(EvasObject main)
        {
            if (_main != null)
            {
                _mainContainer.UnPack(_main);
                _main.Hide();
            }

            _main = main;

            if (_main != null)
            {
                if (!_main.IsVisible)
                {
                    _main.Show();
                }
                _mainContainer.PackEnd(_main);
            }
        }
Beispiel #11
0
 void UpdateChildren()
 {
     if (_searchHandler != null)
     {
         _nativeSearchHandler.Show();
         _title?.Hide();
         _nativeTitleView?.Hide();
     }
     else if (_titleView != null)
     {
         _nativeTitleView.Show();
         _title?.Hide();
         _nativeSearchHandler?.Hide();
     }
     else
     {
         _title.Show();
         _nativeTitleView?.Hide();
         _nativeSearchHandler?.Hide();
     }
     UpdatPageLayout();
 }
Beispiel #12
0
        void OnCurrentPageChanged(object sender, EToolbarItemEventArgs e)
        {
            if (_tpage.SelectedItem == null)
            {
                return;
            }

            if (_tcontent != null)
            {
                _tcontent.Hide();
                _box.UnPack(_tcontent);
                (Element.CurrentPage as IPageController)?.SendDisappearing();
            }

            Element.CurrentPage = _itemToItemPage[_tpage.SelectedItem];
            _tcontent           = Platform.GetOrCreateRenderer(Element.CurrentPage).NativeView;
            _tcontent.SetAlignment(-1, -1);
            _tcontent.SetWeight(1, 1);
            _tcontent.Show();
            _box.PackEnd(_tcontent);
            (Element.CurrentPage as IPageController)?.SendAppearing();
        }
 void SetCurrentItem(EvasObject item)
 {
     _currentItem = item;
     _currentItem.Show();
     _mainLayout.PackEnd(_currentItem);
 }