Back to Devexpress

EventTriggerBase<T>.SourceName Property

wpf-devexpress-dot-mvvm-dot-ui-dot-interactivity-dot-eventtriggerbase-1-f21aa6e6.md

latest2.3 KB
Original Source

EventTriggerBase<T>.SourceName Property

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

Namespace : DevExpress.Mvvm.UI.Interactivity

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public string SourceName { get; set; }
vb
Public Property SourceName As String

Property Value

TypeDescription
String

The name of a source object that raises the event.

|

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 specify the source object’s name, use the SourceName property as follows:

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

You can also use the SourceObject property.

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

See Also

Interactivity.EventTriggerBase

Interactivity.EventTriggerBase

EventTriggerBase<T> Class

EventTriggerBase<T> Members

DevExpress.Mvvm.UI.Interactivity Namespace