How to - Change Next button text to Finish on first page

Wizard for WPF Forum

Posted 15 years ago by Anurodh Ora
Avatar
Hi,

We want to change the button text of Next button to Finish on the first page.
We have the code in place to change Next button text to Finish as below.

if (bTestVariable)
{
    ((Wizard)sender).SetValue(Wizard.NextButtonTextProperty, "_Finish");
}
However we want it on a page therefor we placed it in SelectedPage changed event but it does not fire in case it is the first page itself.

So, the problem is where to place the above code?

Thanks,
Anurodh

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Anurodh,

The Wizard.SelectedPageChanged event does fire fine when switching to the first page. I did a test and breakpoint into the code that occurs when the event is raised. Perhaps you are attaching your handler AFTER the wizard has already initialized and therefore you don't catch that first event instantiation.

Maybe see if attaching to the event can be done in XAML (not sure if that would make a difference) or if that doesn't work, you'd have to do a check after the initial wizard load for this special case.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.