Navigation over a Fixed Linear Topology Sample

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

 
 
 
 
 
(0)
8,199 times
Add to favorites
2/1/2011
E-mail Twitter del.icio.us Digg Facebook
namespace FixedLinearTopologySample
{
    using System;
    using System.Windows.Navigation;
    
    public class WizardLauncher : PageFunction<WizardContext>
    {
        WizardData WizardData = new WizardData();
        
        protected override void Start()
        {
            base.Start();

            // Retain instance in navigation history until Wizard is complete
            this.KeepAlive = true;
            
            // Launch the Wizard
            WizardPage1 WizardPage1 = new WizardPage1(this.WizardData);
            WizardPage1.Return += new ReturnEventHandler<WizardResult>(WizardPage_Return);
            this.NavigationService.Navigate(WizardPage1);
        }

        public void WizardPage_Return(object sender, ReturnEventArgs<WizardResult> e)
        {
            // Wizard was completed (finished or canceled), return WizardResult and WizardData
            OnReturn(new ReturnEventArgs<WizardContext>(new WizardContext(e.Result, this.WizardData)));
        }
    }
}