Home Forums Software Development EyeX Question, WPF Button + Gaze Aware Element.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3327
    Joshua Newn
    Participant

    Hi,

    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,
    Joshua

    #3332
    Jenny [Tobii]
    Participant

    Hi 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.

    #3340
    Joshua Newn
    Participant

    I worked it out, thank you.

    #3347
    Jenny [Tobii]
    Participant

    Great!
    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”).

    #3354
    Joshua Newn
    Participant

    Yup! I figured that out from a thread from another post. Thank you Jenny.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.