All docs
V20.1
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
Bar

ItemMultiTrigger Class

Represents a trigger that applies property values when a set of conditions are satisfied.

Namespace: DevExpress.Xpf.Bars

Assembly: DevExpress.Xpf.Core.v20.1.dll

Declaration

public class ItemMultiTrigger :
    ItemTriggerBase
Public Class ItemMultiTrigger
    Inherits ItemTriggerBase

Remarks

The ItemMultiTrigger allows you to set property values based on a condition collection. A condition is met when the ItemTriggerCondition.Value is equal to the ItemTriggerCondition.Property value or data returned by the ItemTriggerCondition.Binding.

The following code sample sets the BarButtonItem's Foreground to Red when the BarButtonItem is located in the MainMenu and the view model's HighlightItemsInMenu property is true:

Bars - ItemTrigger Binding property

<dxb:BarButtonItem Content="Item">
    <dxb:BarButtonItem.Triggers>
        <dxb:ItemMultiTrigger>
            <dxb:ItemMultiTrigger.Conditions>
                <dxb:ItemTriggerCondition Property="ContainerType" Value="MainMenu"/>
                <dxb:ItemTriggerCondition Binding="{Binding HighlightItemsInMenu}" Value="True"/>
            </dxb:ItemMultiTrigger.Conditions>
            <dxb:ItemSetter Property="Foreground" Value="Red"/>
        </dxb:ItemMultiTrigger>
    </dxb:BarButtonItem.Triggers>
</dxb:BarButtonItem>
using DevExpress.Mvvm;

public class ViewProperties : BindableBase {
    public bool HighlightItemsInMenu {
        get { return GetValue<bool>(); }
        set { SetValue(value); }
    }
}
public partial class MainWindow : DevExpress.Xpf.Core.ThemedWindow
    {
        public MainWindow()
        {
            DataContext = new ViewProperties() { HighlightItemsInMenu = true };
            InitializeComponent();
        }
    }

Inheritance

See Also