Home › Forums › Software Development › Moving VirtualWindows and Interactors
Tagged: Virtual window interactor
- This topic has 0 replies, 1 voice, and was last updated 5 years, 1 month ago by Tobias Kozlowski.
- AuthorPosts
- 09/08/2019 at 22:59 #11862Tobias KozlowskiParticipant
Hello,
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(
“MyFreeFloatingWindow”,
new Tobii.Interaction.Rectangle(Left, Top, Width, Height)
).Result;var virtualAgent = host.InitializeVirtualInteractorAgent(myFreeFloatingWindow.Id);
virtualAgent
.AddInteractorFor(new Tobii.Interaction.Rectangle(Left, Top, Width, Height))
.WithGazeAware()
.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?
Tobias
- AuthorPosts
- You must be logged in to reply to this topic.