Home Forums Software Development Creating call back functions for interactors Reply To: Creating call back functions for interactors


I am working on GazeAwareElements sample code. When I run the program it crashes as I move my gaze on text box and show me error that there is Handler issue.
`private void Instruction_OnHasGazeChanged(object sender, RoutedEventArgs e)
var textBlock = e.Source as TextBlock;
if (null == textBlock) { return; }

var model = (MainWindowModel) DataContext;
var hasGaze = textBlock.GetHasGaze();
The handler issue is indicated on model.NotifyInstructionHasGazeChanged(hasGaze). You can see the example at following link:

https://github.com/Tobii/interaction-samples/tree/master/WpfSamples/GazeAwareElements (Mainwindow.Xmal.cs)