Tagged: Virtual window interactor
- 09/08/2019 at 22:59 #11862Tobias KozlowskiParticipant
i am trying to make WPF Windows gaze aware by overlaying them with a virtual window of the same size. But what can i do when the WPF Window is being resized or moved?
I create a virtual window and an interactor like this:
myFreeFloatingWindow = virtualWindowsAgent.CreateFreeFloatingVirtualWindowAsync(
new Tobii.Interaction.Rectangle(Left, Top, Width, Height)
var virtualAgent = host.InitializeVirtualInteractorAgent(myFreeFloatingWindow.Id);
.AddInteractorFor(new Tobii.Interaction.Rectangle(Left, Top, Width, Height))
.HasGaze(() => Console.WriteLine(“Hello! I am on Virtual Window!”))
.LostGaze(() => Console.WriteLine(“Bye! Do not forget where Virtual window is to look back! :)”));
This works without a problem. Now the WPF window is being moved. I update the location of the virtual window using:
myFreeFloatingWindow.SetBounds(new Tobii.Interaction.Rectangle(Left, Top, Width, Height));
But now it doesn’t work. The window has the right location but what can i do with the interactor? Do i have to delete it and create a new one for the new location to make it work? Or how can i move it?
- You must be logged in to reply to this topic.