SelectionChanging/ SelectionChanged events are not fired once an e.Cancel is set to true in SelectionChanging handler

2 posts, 0 answers
  1. Ahmed
    Ahmed avatar
    2 posts
    Member since:
    Nov 2010

    Posted 10 Aug 2015 Link to this post

    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()

                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.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.

                var wizard = sender as RadWizard;
                if (wizard.SelectedPage.Content == "My First Page Content")
                    e.SelectedPageIndex = 2;

  2. Yoan
    Yoan avatar
    1128 posts

    Posted 11 Aug 2015 Link to this post

    Hi Ahmed,

    Thank you for reporting this bug. I have already fixed it and the fix will be included in our next internal build (next Monday).

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top