You can use LostFocus syntax to connect to the GotFocus and LostFocus
The following code will call GotFocusMethod and LostFocusMethod on your view model:
<TextBox cal:Message.Attach="[Event GotFocus] = [Action GotFocusMethod]; [Event LostFocus] = [Action LostFocusMethod]" />
Note. Remember to separate actions with a semicolon ; when you announce a few actions.
source share