Home › Forums › Software Development › EyeX Question, WPF Button + Gaze Aware Element.
Tagged: activateable, button, WPF
- This topic has 4 replies, 2 voices, and was last updated 8 years, 1 month ago by
Joshua Newn.
- AuthorPosts
- 17/08/2015 at 05:25 #3327
Joshua Newn
ParticipantHi,
I have a couple of WPF controls (such as buttons) that I have added “eyeX:Behaviour.Activatable” and “eyeX:Behavior.Activate”. They work great with the EyeX Button but this is what I am trying to do.
When I click with a mouse on a WPF Button, it returns which object is currently activated by gaze and then adds it to some sort of queue or array. How do I get the object that is currently selected by gaze?
Best Wishes,
Joshua19/08/2015 at 10:03 #3332Jenny [Tobii]
ParticipantHi Joshua,
I’m not sure what you mean by this:
When I click with a mouse on a WPF Button, it returns which object is currently activated by gaze and then adds it to some sort of queue or array.
But the general answer to the question is that you can use the “eyeX:Behavior.ActivationFocusChanged” routed event to keep track of what object is currently selected by gaze. The value of the “eyeX:Behavior.ActivationFocus” property will be “HasTentativeActivationFocus” when the user looks at the button, and then when the user presses down the EyeX Button on the keyboard the ActivationFocus property value will change to “HasActivationFocus”. (When the EyeX Button is released, an “eyeX:Behavior.Activate” event will be triggered for the button looked at.)
I hope this helps.
20/08/2015 at 03:04 #3340Joshua Newn
ParticipantI worked it out, thank you.
20/08/2015 at 15:03 #3347Jenny [Tobii]
ParticipantGreat!
But I realize I forgot one thing: as long as the Activatable property is set to “Default” you will only get activation focus changed events with the value “HasActivationFocus”. To enable the tentative activation focus you need to set the “eyeX:Behavior.Activatable” value to “TentativeFocusEnabled” (instead of “Default”).24/08/2015 at 12:04 #3354Joshua Newn
ParticipantYup! I figured that out from a thread from another post. Thank you Jenny.
- AuthorPosts
- You must be logged in to reply to this topic.