Skip to main content
A newer version of this page is available. .

Wizard.IsButtonCancel Attached Property

Gets or sets a value that indicates whether the Cancel command should be executed when clicking the button. This is an attached property. This is a dependency property.

Namespace: DevExpress.Xpf.Controls

Assembly: DevExpress.Xpf.Controls.v20.2.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Controls, DevExpress.Wpf.Navigation

Declaration

Returns

Type Description
Boolean

true if the button is Cancel button; otherwise, false.

Remarks

The IsButtonCancel, Wizard.IsButtonBack, Wizard.IsButtonNext and Wizard.IsButtonFinish properties are used to create custom buttons.

Example

This example demonstrates how to use the WizardService. See Implementation Details for more information.

See also:

How to create a Wizard with pages defined in XAML

How to: Create a wizard based on a collection of view models

View Example

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DevExpress.Mvvm;
using DevExpress.Mvvm.POCO;

namespace VM_DrivenWizard.ViewModels {
    public class CongratulationsPageViewModel : WizardViewModelBase, ISupportWizardFinishCommand {
        protected CongratulationsPageViewModel() {
            ShowBack = true;
            ShowCancel = true;
            ShowFinish = true;
            AllowBack = true;
        }
        public bool CanFinish {
            get { return true; }
        }

        public void OnFinish(CancelEventArgs e) {
            this.GetService<IMessageBoxService>().ShowMessage("Thank you for completing this WPF feature tour!", "WPF Tour", MessageButton.OK, MessageIcon.Exclamation);
        }
        protected override bool GetCanCancel() {
            return false;
        }
    }
}
See Also