From cd3c5c703feb0a4dac575c4c1918036ab2b15311 Mon Sep 17 00:00:00 2001 From: SymboLinker Date: Wed, 16 Sep 2020 01:25:03 +0200 Subject: [PATCH 01/42] Add TextColor property to BaseButton and make MathInputButton's color customizable The main goal of this commit is to make keyboard colors customizable (per keyboard key) to fit an app's color theme(s). For example, a dark keyboard background with light button texts. CSharpMath.Forms: - Refactor BaseButton's constructor. - Add TextColor property to BaseButton and a bindable TextColorProperty. - Remove the predefined Red color from MathInputButton.InputToLaTeX(input) for "Backspace" and "Clear". CSharpMath.Forms.Example (MathKeyboard.xaml): - Use the TextColorProperty in the Style of "Backspace" and "Clear", setting it to Red. --- .../Controls/MathKeyboard.xaml | 2 + CSharpMath.Forms/Buttons.cs | 63 ++++++++++++++----- CSharpMath.Forms/MathInputButton.cs | 6 +- 3 files changed, 51 insertions(+), 20 deletions(-) diff --git a/CSharpMath.Forms.Example/CSharpMath.Forms.Example/Controls/MathKeyboard.xaml b/CSharpMath.Forms.Example/CSharpMath.Forms.Example/Controls/MathKeyboard.xaml index d7538da6..051c143d 100644 --- a/CSharpMath.Forms.Example/CSharpMath.Forms.Example/Controls/MathKeyboard.xaml +++ b/CSharpMath.Forms.Example/CSharpMath.Forms.Example/Controls/MathKeyboard.xaml @@ -113,12 +113,14 @@ - - - - - - - - - - - - - - -