void rect_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { left = false; last = null; if (ClickAction == null) { ColorChoiceScreen.Show(color, Label); ColorChoiceScreen popup = Popups.Current as ColorChoiceScreen; popup.CloseAction = () => { if (popup.Result == CustomScreenDialogResult.Accept) { Color = popup.Color; } }; } else ClickAction(); if (Click != null) Click(this, e); rect.Fill = new SolidColorBrush(color); }
void rect_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { last = this; left = false; rect.Fill = new SolidColorBrush(Color.FromArgb(255, (byte)(255 - color.R / 2), (byte)(255 - color.G / 2), (byte)(255 - color.B / 2))); }