Example T415416
Visible to All Users

Create a Wizard with Pages Defined in XAML

This example demonstrates how to create a simple Wizard with predefined pages.

image

Wizard control includes the following built-in page types:

  • WelcomeWizardPage
  • WizardPage
  • CompletionWizardPage

These pages have the same functionality, and only their button and content region visibility settings are different. To show/hide page buttons, use the following properties:

Files to Look At

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

Example Code

WizardControlExample/MainWindow.xaml
XAML
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxco="http://schemas.devexpress.com/winfx/2008/xaml/controls" x:Class="WizardControlExample.MainWindow" Title="MainWindow" Height="350" Width="525"> <Grid> <dxco:Wizard Cancel="Wizard_Cancel" AnimationType="Fade"> <dxco:WelcomeWizardPage HeaderBackground="AliceBlue" Header="Header"> <dxco:WelcomeWizardPage.SideContent> <Border Background="Cornsilk"> <TextBlock Text="Side content" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="3"/> </Border> </dxco:WelcomeWizardPage.SideContent> <TextBlock Text="Content" VerticalAlignment="Center" HorizontalAlignment="Center"/> </dxco:WelcomeWizardPage> <dxco:WizardPage> <TextBlock Text="Some page" VerticalAlignment="Center" HorizontalAlignment="Center"/> </dxco:WizardPage> <dxco:CompletionWizardPage ShowBack="False" ShowCancel="False"> <TextBlock Text="Finish" VerticalAlignment="Center" HorizontalAlignment="Center"/> </dxco:CompletionWizardPage> </dxco:Wizard> </Grid> </Window>
WizardControlExample/MainWindow.xaml.cs(vb)
C#
using System; using System.Linq; using System.Windows; using DevExpress.Xpf.Core; namespace WizardControlExample { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void Wizard_Cancel(object sender, System.ComponentModel.CancelEventArgs e) { e.Cancel = (DXMessageBox.Show("Cancel installation and close wizard?", "Confirmation", MessageBoxButton.YesNo) == MessageBoxResult.No); } } }

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.