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

EventTriggerBase<T>.SourceObject Property

Gets or sets a source object that raises the event. This is a dependency property.

Namespace: DevExpress.Mvvm.UI.Interactivity

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

NuGet Package: DevExpress.Wpf.Core

#Declaration

public object SourceObject { get; set; }

#Property Value

Type Description
Object

A behavior’s source object.

#Remarks

A source object is an object that raises events. The default source object is a control associated with the EventToCommand behavior. If you need to bind the behavior’s source object to a control, use the SourceObject property as follows:

<UserControl>
    <dxmvvm:Interaction.Behaviors>        
        <dxmvvm:EventToCommand SourceObject="{Binding ElementName=list}" EventName="MouseDoubleClick" Command="{Binding InitializeCommand}"/>
    </dxmvvm:Interaction.Behaviors>
    <ListBox x:Name="list"/>
</UserControl>

You can also use the SourceName property.

To specify the source object’s event, use either the EventTriggerBase<T>.Event or the EventTriggerBase<T>.EventName property.

See Also