Home Forums Software Development Gaze detection on WPF Button

Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #14088

    Hi. I’m starting with tobii. I want to create a custom button. When the user gaze for 5 seconds, the program clicks on it.

    I get the .xaml aspect

    <Style TargetType=”Button”>
    <Setter Property=”Background” Value=”White” />
    <Trigger Property=”tobii:Behaviors.HasGaze” Value=”True”>
    <Setter Property=”Background” Value=”Magenta” />

    But still struggle with the backend. I think that i have to use “_greetingInteractor.WithGazeAware().HasGaze(onGazeEnters).LostGaze(onGazeLeaves);” , but i don’t get know how to make it work in my context.

    Thank for the help

    Grant [Tobii]

    Hi @grublixx and thanks for your query. You are quite close with the XAML structure however a few additional components remain to make the button not only gaze aware but to launch a procedure when receiving gaze input.

    You will be pleased to know that we have created an article for this purpose within the Core SDK documentation and samples package which you can download @ https://github.com/tobiitech/core-sdk-docs

    Specifically, if you navigate to /docs/articles/wpf.html we explain under the ‘activatable behaviour’ section, the proper methodology to correctly set up an WPF gaze aware interactor.

    For your case, it will be necessary to create a custom timer routine to enable dwell activation, but the syntax will remain the same.

    Hopefully, this is exactly what you are looking for! Please do go through our tutorial and let us know if we can provide any further information or assistance for your project. Best Wishes.

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