public void Highlight(Region Region, TimeSpan Timeout) { // We can't draw over the notch area var cutoutAppliedRegion = CutoutManager.GetCutoutAppliedRegion(_accessibilityService); Region.X -= cutoutAppliedRegion.X; Region.Y -= cutoutAppliedRegion.Y; HighlightView.AddRegion(Region); Task.Delay(Timeout) .ContinueWith(M => HighlightView.RemoveRegion(Region)); }
public override void OnAttachedToWindow() { base.OnAttachedToWindow(); CutoutManager.ApplyCutout(this); }