public void OnClick(Point point) { if (!active) { return; } Point p = PointFromScreen(point); double maxX = this.ActualWidth; double maxY = this.ActualHeight; if (p.X < this.ActualWidth && p.X > 0) { if (p.Y < this.ActualHeight && p.Y > 0) { controller.Enqueue(new Action(() => { controller.ActionClicked(this); })); } } }