Quantcast
Channel: wpftoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 2157

New Post: Using Events of the Wizard

$
0
0
Hi,

Each WizardPage has only 2 events : "Enter" and "Leave". If you want to listen to the "Cancel" and "Next" events, you have to look in the Wizard (containing the Wizard Pages).

You can define it in XAML :
<xctk:Wizard Next="Wizard_Next"
                     Cancel="Wizard_Cancel"/>
with the callbacks in code behind :
private void Wizard_Next( object sender, Toolkit.Core.CancelRoutedEventArgs e )
    {
    }

    private void Wizard_Cancel( object sender, RoutedEventArgs e )
    {
    }
The callbacks will be called every time the "Next" or "Cancel" buttons are clicked.

Or you can do it all in code-behind :
 public WizardView()
    {
      InitializeComponent();

      _wizard.Next += Wizard_Next;
      _wizard.Cancel += Wizard_Cancel;
    }

 private void Wizard_Next( object sender, Toolkit.Core.CancelRoutedEventArgs e )
    {
    }

    private void Wizard_Cancel( object sender, RoutedEventArgs e )
    {
    }

Viewing all articles
Browse latest Browse all 2157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>