added samples
[windows-sources.git] / sdk / samples / WPFSamples / FixedLinearTopologySample / csharp / wizardlauncher.cs
blob6cff235b4e3d7138e34605205dd4652514abd665
1 namespace FixedLinearTopologySample
3 using System;
4 using System.Windows.Navigation;
6 public class WizardLauncher : PageFunction<WizardContext>
8 WizardData WizardData = new WizardData();
10 protected override void Start()
12 base.Start();
14 // Retain instance in navigation history until Wizard is complete
15 this.KeepAlive = true;
17 // Launch the Wizard
18 WizardPage1 WizardPage1 = new WizardPage1(this.WizardData);
19 WizardPage1.Return += new ReturnEventHandler<WizardResult>(WizardPage_Return);
20 this.NavigationService.Navigate(WizardPage1);
23 public void WizardPage_Return(object sender, ReturnEventArgs<WizardResult> e)
25 // Wizard was completed (finished or canceled), return WizardResult and WizardData
26 OnReturn(new ReturnEventArgs<WizardContext>(new WizardContext(e.Result, this.WizardData)));