SupplementaryInteraction - SaneDevelopment/WPF-Controls GitHub Wiki
SupplementaryInteraction
provides attached dependency property SupplementaryInteraction.TriggersProperty
that allow add triggers in XAML Style.Setter
.
SupplementaryInteraction.TriggersProperty
is just list of TriggerBase
items:
public class TriggersCollection : List<System.Windows.Interactivity.TriggerBase>
{ }
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
xmlns:saneDev="uri://schemas.sane-development.com/wpf/2012/xaml">
...
<saneDev:TriggersCollection x:Key="ChildFocusedDataGridRowTriggers" x:Shared="False">
<i:EventTrigger EventName="PreviewMouseLeftButtonDown">
<ei:CallMethodAction TargetObject="{StaticResource DataGridEventManager}"
MethodName="OnPreviewMouseLeftButtonDown"/>
</i:EventTrigger>
</saneDev:TriggersCollection>
...
<Style x:Key="ChildFocusedDataGridRowStyle" TargetType="{x:Type DataGridRow}">
<Style.Setters>
<Setter Property="saneDev:SupplementaryInteraction.Triggers" Value="{StaticResource ChildFocusedDataGridRowTriggers}"/>
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Focusable" Value="False" />
</Style.Setters>
</Style>
...
</ResourceDictionary>