private void LoadLoginControl() { AuthControl control = new AuthControl(); var type = App.CurrentSocialType; control.SetData(type, Constants.GetClient(type)); control.action += (p) => { if (App.IsLoginGoBack) { Deployment.Current.Dispatcher.BeginInvoke(delegate { if (NavigationService.CanGoBack) { NavigationService.GoBack(); } }); } else { _isClearBackStack = true; Deployment.Current.Dispatcher.BeginInvoke(delegate { NavigationService.Navigate(new Uri("/SocialSendPage.xaml", UriKind.Relative)); }); } }; this.LayoutRoot.Children.Add(control); }
private void LoadLoginControl() { AuthControl control = new AuthControl(); var type = SocialUtils.CurrentSocialType; control.SetData(type, SocialUtils.GetClient(type)); control.action += (p) => { Deployment.Current.Dispatcher.BeginInvoke(delegate { if (NavigationService.CanGoBack) { NavigationService.GoBack(); } }); }; this.LayoutRoot.Children.Add(control); }