Class DataGridRowDoubleClickBehavior
A behavior that executes the Command when a DataGridRow is double clicked.
Behavior<DataGrid>.AssociatedObject
Behavior.CreateInstanceCore()
Behavior.Detach()
Behavior.AssociatedType
Namespace: Sartorius.SAF.Presentation.Controls.Behaviors
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
public class DataGridRowDoubleClickBehavior : Behavior<DataGrid>, IAnimatable, IAttachedObject
Examples
This example illustrates how to use the DataGridRowDoubleClickBehavior to edit the selected item of a DataGrid on row double click.
<Grid xmlns:SAF="http://www.sartorius.com/SAF"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors">
<SAF:DataGrid ItemsSource="{Binding Items}"
SelectedItem="{Binding SelectedItem}"
AutoGenerateColumns="True">
<b:Interaction.Behaviors>
<SAF:DataGridRowDoubleClickBehavior Command="{Binding EditSelectedItemCommand}" />
</b:Interaction.Behaviors>
</SAF:DataGrid>
</Grid>
Fields
View SourceCommandParameterProperty
Identifies the CommandParameter dependency property.
Declaration
public static readonly DependencyProperty CommandParameterProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
CommandProperty
Identifies the Command dependency property.
Declaration
public static readonly DependencyProperty CommandProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
Properties
View SourceCommand
The ICommand that is invoked on
Declaration
public ICommand Command { get; set; }
Property Value
| Type | Description |
|---|---|
| ICommand |
CommandParameter
The parameter that is passed when executing the Command.
Declaration
public object CommandParameter { get; set; }
Property Value
| Type | Description |
|---|---|
| object |
Methods
View SourceOnAttached()
Called after the behavior is attached to an AssociatedObject.
Declaration
protected override void OnAttached()
Overrides
Microsoft.Xaml.Behaviors.Behavior.OnAttached()
Remarks
Override this to hook up functionality to the AssociatedObject.
OnDetaching()
Called when the behavior is being detached from its AssociatedObject, but before it has actually occurred.
Declaration
protected override void OnDetaching()
Overrides
Microsoft.Xaml.Behaviors.Behavior.OnDetaching()
Remarks
Override this to unhook functionality from the AssociatedObject.
Implements
Microsoft.Xaml.Behaviors.IAttachedObject