Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SlideViewItem.Command Property

Gets or sets a command executed when the SlideViewItem‘s header is clicked.

Namespace: DevExpress.Xpf.WindowsUI

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

NuGet Package: DevExpress.Wpf.Controls

#Declaration

public ICommand Command { get; set; }

#Property Value

Type Description
ICommand

An object that implements the ICommand interface, executed when the SlideViewItem‘s header is clicked.

#Remarks

You can assign any ICommand interface implementation to a SlideViewItem. This command will be executed after an end-user clicks this item’s header (this also raises the SlideViewItem.Click event for this item and the SlideView.ItemClick event for the entire SlideView). The following code illustrates how to use a DelegateCommand object as the SlideViewItem‘s command.

public slideView() {
    InitializeComponent();
    DevExpress.Xpf.WindowsUI.Base.DelegateCommand myCommand = new DevExpress.Xpf.WindowsUI.Base.DelegateCommand(executeFunc, canExecuteFunc);
    slideViewItem1.Command = myCommand;
}

//a function that checks specific conditions and determines whether our custom command can be executed in its current state
private bool canExecuteFunc() {
    if (. . .) return true;
    else return false;
}

//a function that performs specific actions
private void executeFunc() {
    . . .
}

You can also pass a required object to the SlideViewItem command via the SlideViewItem.CommandParameter property.

See Also