Home Forums Software Development dev Moving VirtualWindows and Interactors

This topic contains 0 replies, has 1 voice, and was last updated by  Tobias Kozlowski 1 week, 1 day ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #11862

    Tobias Kozlowski
    Participant

    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

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.