public static Windows.UI.Xaml.UIElement popFromContainer(Windows.UI.Xaml.UIElement widget) { cave.ui.NavigationWidget ng = null; var pp = cave.ui.Widget.getParent(widget); while (pp != null) { if (pp is cave.ui.NavigationWidget) { ng = (cave.ui.NavigationWidget)pp; break; } pp = cave.ui.Widget.getParent(pp); } if (ng == null) { return(null); } return(ng.popWidget()); }
public static bool pushToContainer(Windows.UI.Xaml.UIElement widget, Windows.UI.Xaml.UIElement newWidget) { cave.ui.NavigationWidget ng = null; var pp = cave.ui.Widget.getParent(widget); while (pp != null) { if (pp is cave.ui.NavigationWidget) { ng = (cave.ui.NavigationWidget)pp; break; } pp = cave.ui.Widget.getParent(pp); } if (ng == null) { return(false); } return(ng.pushWidget(newWidget)); }