|
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using MVVMSample1.ViewModel.CustomWizards;
using System.Diagnostics;
namespace MVVMSample1.ViewModel
{
//use a derived wizard class
public class DerivedViewModel : SampleViewModel
{
DerivedWizard wizard;
public DerivedViewModel()
{
PageTitle = "Derived";
}
public DerivedWizard Wizard
{
get
{
if (wizard == null)
initWizard();
return wizard;
}
}
private void initWizard()
{
wizard = new DerivedWizard();
wizard.WizardCanceled += new EventHandler(wizard_WizardCanceled);
wizard.WizardFinished += new EventHandler(wizard_WizardFinished);
}
private void wizard_WizardFinished(object sender, EventArgs e)
{
Debug.WriteLine(string.Format("Wizard completed for {0} {1}", wizard.FirstName, wizard.LastName));
}
private void wizard_WizardCanceled(object sender, EventArgs e)
{
//handle the cancellation
Debug.WriteLine("The wizard has been canceled");
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.