Opening Wizard from Ribbon

Ribbon for WPF Forum

Posted 15 years ago by Ryan Scholz
Version: 9.1.0500
First of all, I must admit that I am VERY new to VS2008, so I am sorry that this is probably a very basic question.

I have a simple WPF project written in VB that has two main files- a Ribbon window (ribbonWindow1), and a windows wizard (windowsWizard1). In the ribbon window, I have a button named newRequest. I would like to add and event handler to the newRequest button to open the wizard window- how do I do this?

Comments (1)

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

With Ribbon you can use commands (and related command handlers in your Window) to process user interactions, or can do events for specific controls. Commands are generally preferred because they can then be reused in multiple places without extra code.

If you search for "WPF Commands" on Google I'm sure you'll find lots of walkthroughs on using them with buttons. Or even in our WPFpedia I think we link to articles on commands. Our samples mostly show the use of commands in the Ribbon to handle button clicks.

If you want to use events then you'd probably do Click="newRequest_Click" in your attributes for the Button in XAML. That will likely create a new event handler method in your codebehind, assuming you are using VS 2008.

In either case, commands or events, in your handler you would just create a new wizard window and call ShowDialog on it.

Hope that helps.

Actipro Software Support

The latest build of this product (v24.1.2) 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.