public async void NavigateToShellSection(ShellSection shellSection) { if (ShellSection != shellSection) { if (ShellSection != null) { ShellSection.PropertyChanged -= ShellSectionOnPropertyChanged; ShellSectionController.ItemsCollectionChanged -= ShellSectionControllerOnItemsCollectionChanged; ShellSection = null; } ShellSection = shellSection; ShellSection.PropertyChanged += ShellSectionOnPropertyChanged; ShellSectionController.ItemsCollectionChanged += ShellSectionControllerOnItemsCollectionChanged; } UpdateTopTabs(); var content = shellSection.CurrentItem; Page nextPage = (shellSection as IShellSectionController) .PresentedPage ?? ((IShellContentController)content)?.GetOrCreateContent(); SectionFrame.Navigate(new ShellPageWrapper()); await Task.Delay(100); var shellSectionCurrent = Shell.CurrentItem.CurrentItem; NavigateToContent(new NavigationRequestedEventArgs(nextPage, true), shellSectionCurrent); }
internal void GetVertices(HVA.Section MotLib, int FrameIdx, PAL Palette, List <VertexPositionColorNormal> Vertices, List <int> Indices) { if (ComputedFrames[FrameIdx] == null) { ComputeVerticesIndices(Palette); var computedF = new SectionFrame(); var rot = MotLib.GetRotation(FrameIdx); var pos = MotLib.GetPosition(FrameIdx); pos *= Tail.HVAMultiplier; computedF.ComputedVertices = ComputedVertices.Select(v => { v.Position = Vector3.Transform(v.Position, rot); v.Position += pos; return(v); }).ToList(); computedF.ComputedIndices = ComputedIndices; ComputedFrames[FrameIdx] = computedF; } var cached = ComputedFrames[FrameIdx]; Vertices.AddRange(cached.ComputedVertices); Indices.AddRange(cached.ComputedIndices); }
private void OnInsertRequested(NavigationRequestedEventArgs args) { var pageIndex = ShellSection.Stack.ToList().IndexOf(args.Page); if (pageIndex == ((IEnumerable <object>)SectionFrame.BackStack).Count() - 1) { SectionFrame.Navigate(new ShellPageWrapper()); } else { // // ((IEnumerable<object>)SectionFrame.BackStack). } }
internal void GetVertices(HVA.Section MotLib, int FrameIdx, PAL Palette, List<VertexPositionColorNormal> Vertices, List<int> Indices) { if (ComputedFrames[FrameIdx] == null) { ComputeVerticesIndices(Palette); var computedF = new SectionFrame(); var rot = MotLib.GetRotation(FrameIdx); var pos = MotLib.GetPosition(FrameIdx); pos *= Tail.HVAMultiplier; computedF.ComputedVertices = ComputedVertices.Select(v => { v.Position = Vector3.Transform(v.Position, rot); v.Position += pos; return v; }).ToList(); computedF.ComputedIndices = ComputedIndices; ComputedFrames[FrameIdx] = computedF; } var cached = ComputedFrames[FrameIdx]; Vertices.AddRange(cached.ComputedVertices); Indices.AddRange(cached.ComputedIndices); }
private async void OnPushRequested(NavigationRequestedEventArgs args) { SectionFrame.Navigate(new ShellPageWrapper()); }
private async void OnPopRequested(NavigationRequestedEventArgs args) { SectionFrame.GoBack(); }