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); }
void RemovePage(EvasObject del) { _pageToNative.Remove(_nativeToPage[del]); _nativeToPage.Remove(del); _navigationStack.Remove(del); del.Hide(); del.Unrealize(); }
public void Insert(EvasObject before, EvasObject view) { view.Hide(); var idx = InternalStack.IndexOf(before); InternalStack.Insert(idx, view); PackEnd(view); UpdateTopView(); }
void ResetCurrentItem() { if (_currentItem != null) { _mainLayout.UnPack(_currentItem); _currentItem.Hide(); _currentItem = null; } }
void UpdateTopView() { if (_lastTop != InternalStack.LastOrDefault()) { _lastTop?.Hide(); _lastTop = InternalStack.LastOrDefault(); _lastTop.Show(); } }
void UnsetMainContent() { if (_content != null) { _contentBox.UnPack(_content); _content.Hide(); _content = null; } }
void UpdateTopView() { if (_lastTop != InternalStack.LastOrDefault()) { _lastTop?.Hide(); _lastTop = InternalStack.LastOrDefault(); _lastTop.Show(); (_lastTop as Widget)?.SetFocus(true); } }
public static void UpdateVisibility(this EvasObject platformView, IView view) { if (view.Visibility.ToPlatformVisibility()) { platformView.Show(); } else { platformView.Hide(); } }
void UnsetDrawerContent() { if (_drawerContent != null) { _drawerContentBox.UnPack(_drawerContent); _drawerContent.Hide(); _drawerContent = null; _drawerContentBox.Hide(); _drawerIconBox.Hide(); } }
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(); }
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); } }
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(); }