Some Queries - Need urgent help !!!

Wizard for WPF Forum

Posted 15 years ago by Anurodh Ora
Version: 4.5.0480
Avatar
Hi All,

Can anybody suggest on how to meet following requirements :
    1) Aligning caption and description of the wizard
    2) Aligning footer buttons to have consistent space between them
    3) Changing button text, say i want to have Cancel button with Close caption
    4) To make Finish button act as Next button. The idea behind this is that on penultimate step we want to have finish button that will notify user that after finishing you wont revert back the operation and on the last page we will show the progress of the processing and present user with Close(Cancel button with caption changed) button. So in this case our Finish button will act as Next button. Any idea on how to achieve this?
Looking forward to get some nice suggestions/samples/tips.

Thanks and Regards,
Anurodh

Comments (9)

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

1+2) Those both would require retemplating of the control, which actually is pretty easy if you have the default templates. If you are a WPF Studio customer, we can send you the default templates.

3) You can change the Wizard.CancelButtonText property for that.

4) You can handle the Wizard.Finish event and do your custom processing there. To move to the next page programmatically you can set the SelectedIndex or SelectedPage properties.


Actipro Software Support

Posted 15 years ago by Anurodh Ora
Avatar
Hi,

Thanks for the reply.

For 4) we already did this before posting it however it was closing wizard though we handled that event. I think we need to set Wizard.FinishButtonClosesWindow to false and then handle the Finish event. Is this true ?

Thanks,
Anurodh
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
That is correct.


Actipro Software Support

Posted 15 years ago by Anurodh Ora
Avatar
Hi,

We tried to change next button caption from code behind for one of the wizard page (say wpgStep1) like:
wpgStep1.SetValue(Wizard.NextButtonTextProperty, "Finish");
but it did not work.

Could you please tell us what are we doing wrong here.

Thanks,
Anurodh

[Modified at 11/28/2008 12:25 PM]
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
You can't set it on a page instance, that is a Wizard property. Instead if you only want it for one page, you'll have to update the Wizard.NextButtonText property value in a Wizard.SelectedPageChanged event handler.


Actipro Software Support

Posted 15 years ago by Anurodh Ora
Avatar
Thank you very much,

with this i got it working
((Wizard)sender).SetValue(Wizard.NextButtonTextProperty, "_Finish");
But i am facing another problem.

1) On selected page changing event i am evaluating a bool variable and if it is true i want to directly go to step4 from step1.
we did it like this:
if (isGoDirect && e.NewSelectedPage == Step1)
                    {
                        if (e.NewSelectedPage != Step4)
                        {
                            e.Cancel = true;
                            wzdTest.SelectedPage = Step4;
                        }
                    }
2) On selected page changed event if we get to Step4 we are processing something like
if (e.NewSelectedPage == Step4)
            {
                DoSomething();
            }
The problem is that the above code is getting called twice. Can you suggest what we are doing wrong here?

Thanks,
Anurodh

[Modified at 11/29/2008 01:17 AM]

[Modified at 11/29/2008 01:44 AM]
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Anurodh,

Thanks, this unfortunately isn't something we can control. The problem is that your setting of SelectedPage raises it once, as does the original setting of SelectedPage that called the SelectedPageChanging in the first place. The OnSelectedPageChanged call happens by default in WPF.

However we did create an alternate way of doing page reroutes for the next maintenance release. Instead of doing e.Cancel = true and setting SelectedPage, you'll just do e.NewSelectedPage = mypage to switch to a new page. That only generates a single SelectedPageChanged event and works as expected.


Actipro Software Support

Posted 15 years ago by Anurodh Ora
Avatar
Could you please tell me when can we get the fix.

Anurodh

[Modified at 12/01/2008 11:01 PM]
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Anurodh,

It will be in the next maintenance release, which should be out in the next couple weeks or so. You can monitor our web site for when it is released or attach our Announcement forum's RSS feed to be notified.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.