private void AreaButton_Click(object sender, RoutedEventArgs e) { CircularGazeButton btn = (CircularGazeButton)sender; if (btn.ButtonText == "Area") { this.ToggleDrawingAreaButtons(true); } else { this.ToggleDrawingAreaButtons(false); } }
private void AdjustDrawingAreaButton_Click(object sender, RoutedEventArgs e) { CircularGazeButton btn = (CircularGazeButton)sender; // logic to scale the strokes on the inkCanvas by 0.5 if (btn.ButtonText == "-" && targetArea >= -2) { targetArea -= 1; } // logic to scale the strokes on the inkCanvas by 0.5 else if (btn.ButtonText == "+" && targetArea < 0) { targetArea += 1; } this.SetDrawingZoneRectangle(targetArea); }
private static void OnPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) { CircularGazeButton circle = sender as CircularGazeButton; circle.RenderArc(); }