private void OnColorChoose(object sender, RoutedEventArgs e)
        {
            var button = sender as Button;

            if (sender == null)
            {
                return;
            }

            ColorChoose?.Invoke(button.Background);
        }
Example #2
0
	public void SetCurrentColorMode(string colorMode)
    {
        switch (colorMode.ToLower())
        {
            case "grad":
                this.currentColorChoose = ColorChoose.Grad;
                break;
            case "red":
                this.currentColorChoose = ColorChoose.Red;
                break;
            case "blue":
                this.currentColorChoose = ColorChoose.Blue;
                break;
        }
    }