コード例 #1
0
        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");
            }
        }
コード例 #2
0
        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();
            }
        }
コード例 #3
0
 private void BtnAddContact_Click(object sender, RoutedEventArgs e)
 {
     VisualStateHelper.SwitchVisualState(this, VisualStateGroup, "state_FrameZero", "state_320");
     rootframe.Navigate(typeof(AddContactPage));
 }