Does GotFocus event get fired for a view in a Module that is navigated to? #2398
Unanswered
stevensrf11
asked this question in
WPF
Replies: 1 comment
-
Prism has no control over when gotfocus is called in an application. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a view which is a UserControl in a Prism Module. This view is navigated to via Prism. I am using the XAML Behaviors eventtrigger to bind the GetFocus event to DelagateCommand in the corresponding view model. The binding connection happening because the output window shows no error on the binding. The problem is the eventrigger is not getting fired. Am I missing something Does a GetFocus event get fired for a view when navigated to? Below is the code.
Behaviors:Interaction.Triggers
<Behaviors:EventTrigger EventName="LostFocus">
<Behaviors:InvokeCommandAction Command="{Binding LostFocusCommand}" PassEventArgsToCommand="True"/>
</Behaviors:EventTrigger>
<Behaviors:EventTrigger EventName="GotFocus">
<Behaviors:InvokeCommandAction Command="{Binding GotFocusCommand}" PassEventArgsToCommand="True" />
</Behaviors:EventTrigger>
</Behaviors:Interaction.Triggers>
public class AdminConfigCreateJobViewModel : ViewModelBase
{
#region Fields
///
/// _xpubServiceAdmin field interface
/// Contains references to administration services
///
private readonly IXPubServiceAdmin _xpubServiceAdmin;
#endregion
Beta Was this translation helpful? Give feedback.
All reactions