public ImportContactUserControl(CEPersonView cePersonView, DialogService dialogService)
 {
     InitializeComponent();
     _cePersonView = cePersonView;
     _cePersonViewModel = (CEPersonViewModel)_cePersonView.DataContext;
     _dialogService = dialogService;
 }
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            IDictionary<string, string> parameters = this.NavigationContext.QueryString;

            if (parameters.ContainsKey("PersonId"))
                PersonId = Int32.Parse(parameters["PersonId"]);

            base.OnNavigatedTo(e);

            if (e.NavigationMode != NavigationMode.Back)
            {
                SlideTransition transition = new SlideTransition();
                transition.Mode = SlideTransitionMode.SlideRightFadeIn;

                PhoneApplicationPage page = (PhoneApplicationPage)((PhoneApplicationFrame)Application.Current.RootVisual).Content;
                ITransition trans = transition.GetTransition(page);

                trans.Completed += delegate
                {
                    trans.Stop();

                    if (e.NavigationMode == NavigationMode.New)
                    {
                        cePersonViewModel = new CEPersonViewModel(this, PersonId);
                        this.DataContext = cePersonViewModel;
                    }

                };
                trans.Begin();
            }
        }