I have used the wizard events to control my wizard navigation but once I cancel the navigation for one step using e.Cancel, The SelectionChanging/ SelectionChanged events doesn't get fired.
I was using the UI for WPF Q1 2015 and now updated to UI for WPF Q2 2015 but still the same problem exists.
check this code sample
using System.Windows;
using Telerik.Windows.Data;
using Telerik.Windows.Controls;
namespace WizardNavigation
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private ObservableItemCollection<WizardPage> collection;
private int cancelCounter = 1;
public MainWindow()
{
InitializeComponent();
collection = new ObservableItemCollection<WizardPage>();
var firstPage = new WizardPage {Content = "My First Page Content"};
var secondPage = new WizardPage {Content = "My Second Page Content"};
var thirdPage = new WizardPage {Content = "My Third Page Content"};
var fourthPage = new WizardPage {Content = "My Fourth Page Content"};
myWizard.WizardPages.Add(firstPage);
myWizard.WizardPages.Add(secondPage);
myWizard.WizardPages.Add(thirdPage);
myWizard.WizardPages.Add(fourthPage);
myWizard.Next += myWizard_Next;
myWizard.SelectionChanging += myWizard_SelectionChanging;
}
void myWizard_SelectionChanging(object sender, SelectedPageChangingEventArgs e)
{
if (cancelCounter != 2) return;
e.Cancel = true;
MessageBox.Show("Cancelled, Click again to navigate");
}
void myWizard_Next(object sender, NavigationButtonsEventArgs e)
{
// You will need to click the next twice for to move to step 3.
// SelectionChanging will not be called on the second click
//SelectionChanging will be called when moving to forth step.
cancelCounter++;
var wizard = sender as RadWizard;
if (wizard.SelectedPage.Content == "My First Page Content")
{
e.SelectedPageIndex = 2;
}
}
}
}