I have the following test code, based on the example in Catel-LATEST:
<StackPanel VerticalAlignment="Center">
<TextBox Name="testTarget" Text="{Binding FirstName, UpdateSourceTrigger=PropertyChanged, FallbackValue='Test Target'}" Background="Aquamarine">
<i:Interaction.Behaviors>
<catel:Focus FocusMoment="Event" Source="{Binding ElementName=mouseEnter}" EventName="MouseEnter" FocusDelay="0" />
<catel:Focus FocusMoment="Event" Source="{Binding ElementName=mouseLeftButtonUp}" EventName="MouseLeftButtonUp" FocusDelay="0"/>
</i:Interaction.Behaviors>
</TextBox>
<TextBox Name="mouseEnter" Text="Mouse Enter"/>
<TextBox Name="mouseLeftButtonUp" Text="Left Button Up"/>
</StackPanel>
I can click on mouseEnter
and then move the mouse away and back, and focus moves to testTarget
, as desired. But when I left-click on mouseLeftButtonUp
, it stays on that control. Am I doing something wrong? Or perhaps there's a restricted list of EventName
values that FocusMoment
responds to?