1 namespace FixedLinearTopologySample
5 using System
.Windows
.Controls
;
6 using System
.Windows
.Navigation
;
8 public partial class WizardPage2
: PageFunction
<WizardResult
>
10 public WizardPage2(WizardData WizardData
)
12 InitializeComponent();
14 // Bind Wizard state to UI
15 this.DataContext
= WizardData
;
18 void backButton_Click(object sender
, RoutedEventArgs e
)
20 // Go to previous Wizard page
21 this.NavigationService
.GoBack();
24 void nextButton_Click(object sender
, RoutedEventArgs e
)
26 // Go to next Wizard page
27 WizardPage3 WizardPage3
= new WizardPage3((WizardData
)this.DataContext
);
28 WizardPage3
.Return
+= new ReturnEventHandler
<WizardResult
>(WizardPage_Return
);
29 this.NavigationService
.Navigate(WizardPage3
);
32 void cancelButton_Click(object sender
, RoutedEventArgs e
)
34 // Cancel the Wizard and don't return any data
35 OnReturn(new ReturnEventArgs
<WizardResult
>(WizardResult
.Canceled
));
38 public void WizardPage_Return(object sender
, ReturnEventArgs
<WizardResult
> e
)
40 // If returning, Wizard was completed (finished or canceled),
41 // so continue returning to calling page