private void OnContactSelected(object sender, ItemClickEventArgs e)
        {
            Contact contact = e.ClickedItem as Contact;

            if (contact != null)
            {
                rootframe.Navigate(typeof(ContactDetailPage), contact);
                VisualStateHelper.SwitchVisualState(this, VisualStateGroup, "state_FrameZero", "state_320");
            }
        }
        private void RootHost_BackRequested(object sender, BackRequestedEventArgs e)
        {
            if (VisualStateHelper.SwitchVisualState(this, VisualStateGroup, "state_320", "state_FrameZero"))
            {
                return;
            }

            if (rootframe.CanGoBack)
            {
                e.Handled = true;
                rootframe.GoBack();
            }
        }
 private void BtnAddContact_Click(object sender, RoutedEventArgs e)
 {
     VisualStateHelper.SwitchVisualState(this, VisualStateGroup, "state_FrameZero", "state_320");
     rootframe.Navigate(typeof(AddContactPage));
 }