This is a migrated thread and some comments may be shown as answers.

RadWizard Double Completed

1 Answer 60 Views
Wizard
This is a migrated thread and some comments may be shown as answers.
Reilly
Top achievements
Rank 1
Veteran
Reilly asked on 23 Mar 2018, 03:29 PM

I have a simple RadWindow modal dialog that contains nothing but a RadWizard. On the CompletionWizardPage, I have the finish button text set to a localized string.

The caller adds an event handler to the Completed event and then calls ShowDialog().

If I double-click "Finish" really fast on the dialog, my Completed handler does indeed get called twice. That is not good eats. (Granted, any sane user would not double-click a button, but my tester's sanity is in question.)

I'm using UI for WPF 2017.3.1018.45 on 64 bit Win 10 and VS 2015.

Seems that a debounce is in order for that button.

-reilly.

 

1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 23 Mar 2018, 03:56 PM
Hello Reilly,

Generally, the Finish command is executed once the Finish button is clicked. The execution of the command is raising the CompletedEvent. Only one click is needed in order to raise the event. 

I believe that the ShowDialog should block the UI and you should not be able to click the Finish button twice. However, it seems that your tester is faster than ShowDialog :)

What you can try is to set the IsEnabled of the Finish button to False just before ShowDialog(). This could be implemented by placing your custom button in page's footer. Please check the 
Commands help article for a reference.

Regards,
Yoan
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
Wizard
Asked by
Reilly
Top achievements
Rank 1
Veteran
Answers by
Yoan
Telerik team
Share this question
or