Navigation over a Dynamically-Generated Topology Sample

This sample illustrates how to support navigation over a dynamically-generated navigation topology. Building the Sample Install the Windows Software Development Kit (SDK) and open its build environment command window.

 
 
 
 
 
(0)
7,534 times
Add to favorites
2/1/2011
E-mail Twitter del.icio.us Digg Facebook
namespace AdaptiveTopologySample
{
    using System;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Navigation;

    /// <summary>
    /// Interaction logic for DataEntryPage.xaml
    /// </summary>

    public partial class DataEntryPage : PageFunction<WizardContext>
    {
        public DataEntryPage()
        {
            InitializeComponent();
        }

        void okButton_Click(object sender, RoutedEventArgs e)
        {
            // Go to next Wizard - as determined by the navigation hub
            WizardNavigationDirection direction = ((bool)this.forwardsRadioButton.IsChecked ? WizardNavigationDirection.Forwards : WizardNavigationDirection.Reverse);
            OnReturn(new ReturnEventArgs<WizardContext>(new WizardContext(WizardResult.Finished, direction)));
        }

        void cancelButton_Click(object sender, RoutedEventArgs e)
        {
            // Cancel the Wizard and don't return any data
            OnReturn(new ReturnEventArgs<WizardContext>(new WizardContext(WizardResult.Canceled, null)));
        }
    }
}