We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

WPF Wizard - event nadlers for navigation buttons

Thread ID:

Created:

Updated:

Platform:

Replies:

91820 Dec 4,2009 07:12 AM UTC Dec 8,2009 12:18 PM UTC WPF 1
loading
Tags: Tools
sasi
Asked On December 4, 2009 07:12 AM UTC

Hi,

how to capture events for navigation Buttons?

1. I want to avoid going to Next Page when some condition Fail.

2. I wanted to Open a New Window on Click of Finish Button

3. How to configure close and control the parent dialog's (modal Window) DialogResult property when the "Cancel" and "Finish" buttons are clicked

Thx

Venugopal M [Syncfusion]
Replied On December 8, 2009 12:18 PM UTC

Hi Nan,

Thanks for your interest in Syncfusion products. Please find my response for your queries.

1. I want to avoid going to Next Page when some condition Fail.

You can use SelectedPageChanging event of WizardControl to cancel the next page selection based on some condition check.

For instance :



WizardPageSelectionChangeEventArgs has Cancel property to cancel the next page selection as follows.
private void wizardControl_SelectedPageChanging(object sender, WizardPageSelectionChangeEventArgs e)
{
if (Condition)
e.Cancel = true;
else
e.Cancel = false;
}

2. I wanted to Open a New Window on Click of Finish Button.

Register the Finish event of WizardControl and open your new window as mentioned below.

private void wizardControl_Finish(object sender, RoutedEventArgs e)
{
Window mywindow = new Window();
mywindow.Show();
}

3. How to configure close and control the parent dialog's (modal Window) DialogResult property when the "Cancel" and "Finish" buttons are clicked

As we did in your second query, you can use Cancel of Finish event which is available in WizardControl class to achieve this.

Note :

You can also make use of CancelButtonCancelsWindow and FinishButtonClosesWindow property to close the parent window automatically.

Please let me know if you have any questions.

Thanks,
Venugopal.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;