public DialogHost(INavigationService navigationSvc) { this.navigationSvc = navigationSvc; currentPage = navigationSvc.CurrentContent as PhoneApplicationPage; if (currentPage == null) { throw new InvalidOperationException( string.Format("In order to use ShowDialog the view currently loaded in the application frame ({0})" + " should inherit from PhoneApplicationPage or one of its descendents.", navigationSvc.CurrentContent.GetType())); } navigationSvc.Navigating += OnNavigating; navigationSvc.Navigated += OnNavigated; CreateUIElements(); elementPlacementAnimator = CreateElementsAnimator(); }
public DialogHost(PhoneApplicationPage currentPage) { this.currentPage = currentPage; CreateUIElements(); elementPlacementAnimator = CreateElementsAnimator(); }