private void OnTransition(MatchmakingTabViewEnum obj) { if (_pages.ContainsKey(obj) == false) { throw new InvalidOperationException("Page " + obj.ToString() + " doesn't exist"); } if (Dispatcher.CheckAccess() == false) { Dispatcher.Invoke(new Action(() => OnTransition(obj))); return; } var page = _pages[obj]; var curPage = _pages[_currentPage]; foreach (var p in _pages) { p.Value.IsHitTestVisible = false; } page.IsHitTestVisible = true; var sl = this.FindResource("SlideLeftHide") as Storyboard; Storyboard.SetTarget(sl, curPage); sl.Begin(); var sl2 = this.FindResource("SlideLeftShow") as Storyboard; Storyboard.SetTarget(sl2, page); sl2.Begin(); _currentPage = obj; }
private void OnTransition(MatchmakingTabViewEnum obj) { if (_pages.ContainsKey(obj) == false) throw new InvalidOperationException("Page " + obj.ToString() + " doesn't exist"); if (Dispatcher.CheckAccess() == false) { Dispatcher.Invoke(new Action(() => OnTransition(obj))); return; } var page = _pages[obj]; var curPage = _pages[_currentPage]; foreach (var p in _pages) { p.Value.IsHitTestVisible = false; } page.IsHitTestVisible = true; var sl = this.FindResource("SlideLeftHide") as Storyboard; Storyboard.SetTarget(sl, curPage); sl.Begin(); var sl2 = this.FindResource("SlideLeftShow") as Storyboard; Storyboard.SetTarget(sl2, page); sl2.Begin(); _currentPage = obj; }