diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml
index 7583daf9..18aa4d3d 100644
--- a/Ink Canvas/MainWindow.xaml
+++ b/Ink Canvas/MainWindow.xaml
@@ -8089,96 +8089,15 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -8197,36 +8116,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
diff --git a/InkCanvas.Controls/GeometryButton.xaml b/InkCanvas.Controls/GeometryButton.xaml
new file mode 100644
index 00000000..d79c9cbe
--- /dev/null
+++ b/InkCanvas.Controls/GeometryButton.xaml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
diff --git a/InkCanvas.Controls/GeometryButton.xaml.cs b/InkCanvas.Controls/GeometryButton.xaml.cs
new file mode 100644
index 00000000..4ce60a3a
--- /dev/null
+++ b/InkCanvas.Controls/GeometryButton.xaml.cs
@@ -0,0 +1,62 @@
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Media;
+
+namespace Ink_Canvas.Controls
+{
+ public partial class GeometryButton : UserControl
+ {
+ public static readonly DependencyProperty LabelProperty = DependencyProperty.Register(
+ nameof(Label), typeof(string), typeof(GeometryButton),
+ new PropertyMetadata(string.Empty, OnLabelChanged));
+
+ private static void OnLabelChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ var button = (GeometryButton)d;
+ if (button.LabelControl != null)
+ button.LabelControl.Content = (string)e.NewValue;
+ }
+
+ public string Label
+ {
+ get => (string)GetValue(LabelProperty);
+ set => SetValue(LabelProperty, value);
+ }
+
+ public static readonly DependencyProperty IconSourceProperty = DependencyProperty.Register(
+ nameof(IconSource), typeof(ImageSource), typeof(GeometryButton),
+ new PropertyMetadata(null, OnIconSourceChanged));
+
+ private static void OnIconSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ var button = (GeometryButton)d;
+ if (button.ButtonImage != null)
+ button.ButtonImage.Source = (ImageSource)e.NewValue;
+ }
+
+ public ImageSource IconSource
+ {
+ get => (ImageSource)GetValue(IconSourceProperty);
+ set => SetValue(IconSourceProperty, value);
+ }
+
+ public event MouseButtonEventHandler ButtonMouseDown;
+ public event MouseButtonEventHandler ButtonMouseUp;
+
+ public GeometryButton()
+ {
+ InitializeComponent();
+ }
+
+ private void ButtonPanel_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+ ButtonMouseDown?.Invoke(this, e);
+ }
+
+ private void ButtonPanel_MouseUp(object sender, MouseButtonEventArgs e)
+ {
+ ButtonMouseUp?.Invoke(this, e);
+ }
+ }
+}