added samples
[windows-sources.git] / sdk / samples / WPFSamples / WizardSample / visualbasic / wizardlauncher.vb
bloba42af3631750f6a2bfe6648c894fcf38bcd6e6aa
1 Imports System
2 Imports System.Runtime.CompilerServices
3 Imports System.Windows.Navigation
5 Public Class WizardLauncher
6 Inherits PageFunction(Of WizardResult)
8 Public Event WizardReturn As WizardReturnEventHandler
10 Public Sub New()
11 Me.wizardData = New WizardData
12 End Sub
14 Protected Overrides Sub Start()
15 MyBase.Start()
16 MyBase.KeepAlive = True
17 Dim firstPage As New WizardPage1(Me.wizardData)
18 AddHandler firstPage.Return, New ReturnEventHandler(Of WizardResult)(AddressOf Me.wizardPage_Return)
19 MyBase.NavigationService.Navigate(firstPage)
20 End Sub
22 Public Sub wizardPage_Return(ByVal sender As Object, ByVal e As ReturnEventArgs(Of WizardResult))
23 RaiseEvent WizardReturn(Me, New WizardReturnEventArgs(e.Result, Me.wizardData))
24 Me.OnReturn(Nothing)
25 End Sub
27 Private wizardData As WizardData
29 End Class