A sample WPF C# client for Skyle

Today I want to show you an example how easy it is, to connect to our eye tracker Skyle in a .NET 5 WPF project with C#. Since we released the SkyleAPI NuGet package two month ago, you can just start with our simple API implementation (https://www.nuget.org/packages/SkyleAPI/).

The goal here is: we want to see the current gaze point, do a simple calibration, and see our eye positions.

The first step is to create a new project in Visual Studio or with the .NET CLI. I will use the CLI in this quick introduction. Create a folder Skyle_Sample and create a new WPF project in it:

dotnet new wpf

Next, you want to add the SkyleAPI package:

dotnet add package SkyleAPI --version 1.0.0

You can compile the project:

dotnet build

Now we need to add some code. Since the project should have a small GUI, you can edit the MainWindow.xaml and add the sample code:

https://github.com/eyev-de/SkyleAPI.NET_Sample/blob/master/MainWindow.xaml

This sample code will just create three buttons and some shapes on a canvas.

For the MainWindow.xaml.cs I wrote some tiny program code that you can find here:

https://github.com/eyev-de/SkyleAPI.NET_Sample/blob/master/MainWindow.xaml.cs

This code is as simple as possible. With just a few lines we can create a working GUI for calibration, positioning display and gaze display.

If you want to test this now, you can simply clone the whole code from GitHub:

https://github.com/eyev-de/SkyleAPI.NET_Sample

2 thoughts on “A sample WPF C# client for Skyle”

  1. Pingback: Skyle for Android - eyeV meets Bewatec

Leave a Reply to Teknik Informatika Cancel Reply

Your email address will not be published. Required fields are marked *

en_USEnglish