SlideView.BackCommand Property
Gets or sets the command assigned to the SlideView‘s Back Button.
Namespace: DevExpress.Xpf.WindowsUI
Assembly: DevExpress.Xpf.Controls.v24.1.dll
NuGet Package: DevExpress.Wpf.Controls
Declaration
Property Value
Type | Description |
---|---|
ICommand | An ICommand object that is the command assigned to the SlideView‘s Back Button. |
Remarks
Use the SlideView.ShowBackButton property to display or hide the SlideView‘s Back Button. By default, clicking a Back Button will navigate to either the previous view, or to root view depending on the NavigationFrame.BackNavigationMode property value of a NavigationFrame container involved in navigation. See the Navigation topic for the details.
You can assign your own command to the Back Button via the BackCommand property. The code below demonstrates the example.
private bool canExecuteFunc() {
//checks specific conditions and determines whether our custom command can be executed in its current state
if (. . .) return true;
else return false;
}
private void executeFunc() {
//performs specific actions
. . .
}
public myView1() {
InitializeComponent();
//defines the custom command and assigns it to the container's back button
DevExpress.Mvvm.DelegateCommand cmdBack = new DevExpress.Mvvm.DelegateCommand(executeFunc, canExecuteFunc);
slideView1.BackCommand = cmdBack;
slideView1.ShowBackButton = true;
}