Create a Gaze Reactive Button - accessibilitysoftwarehub/OpenSourceWindowsGazeControl GitHub Wiki

Creating a gaze reactive button

To create a gaze reactive button, on the form create a panel 4,5 bigger than the button will be (54,55 panel for a 50,50 button) then add the new button in it. The bigger panel puts a red border around the button when gazed upon.

Making button gaze reactive

Go to the behaviour map for the form the button was put on.

e.g.

Settings.BehavMap.cs

Create a new OnClick method for the new button.

Create Onclick

Create a method to add all controls to the behavior map, if using multiple behavior maps per form this method will only contain the controls in the panel the behavior map is for.

In the behavior map's setup method add all buttons to the behavior map, passing in the OnClick method. Add the panels for each button, passing in the OnGazeChangeBTColour() method.

Setup bhavMap