Skip to main content
Bar

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

BarItemTriggerCollection.TargetType Property

Gets or sets the type for which the triggers are intended.

Namespace: DevExpress.Xpf.Bars

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

NuGet Package: DevExpress.Wpf.Core

#Declaration

public Type TargetType { get; set; }

#Property Value

Type Description
Type

The target type for triggers.

#Remarks

The following code sample uses triggers defined in the ThemedWindow’s Resources:

<dx:ThemedWindow ...
  xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
  xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"/>
  <dx:ThemedWindow.Resources>
    <dxb:BarItemTriggerCollection x:Key="buttonItemTriggers" TargetType="{x:Type dxb:BarCheckItem}">
      <dxb:ItemTrigger Property="IsMouseOver" Value="True">
        <dxb:ItemSetter Property="Foreground" Value="Green"/>
      </dxb:ItemTrigger>
      <dxb:ItemTrigger Property="IsChecked" Value="True">
        <dxb:ItemSetter Property="Foreground" Value="Blue"/>
      </dxb:ItemTrigger>
    </dxb:BarItemTriggerCollection>
  </dx:ThemedWindow.Resources>
  <dxb:BarCheckItem x:Name="item" Content="CheckItem" Triggers="{StaticResource buttonItemTriggers}"/>
</dx:ThemedWindow>

See Also