private async void InitializeAsync() { var result = await App.DriverDaemon.InvokeAsync(d => d.SetTabletDebug(true)); var guids = result.ToList(); if (guids.Count > 0) { var tabletReader = new PipeReader(guids[0]); tabletReader.Report += HandleReport; this.Closing += (sender, e) => tabletReader.Dispose(); } if (guids.Count > 1) { var auxReader = new PipeReader(guids[1]); auxReader.Report += HandleReport; this.Closing += (sender, e) => auxReader.Dispose(); } this.Closing += async (sender, e) => await App.DriverDaemon.InvokeAsync(d => d.SetTabletDebug(false)); }