Beispiel #1
0
        /// <summary>
        /// Will be raised if user turns off the pixel via a picker action.
        /// It will raise an `OnTurnOffRequested` command.
        /// </summary>
        /// <param name="sender">Sender's button</param>
        /// <param name="e">Event args</param>
        private void ColorPickerTurnOffButton_Click(object sender, RoutedEventArgs e)
        {
            var index = Convert.ToInt32(PixelColorPicker.Tag);

            viewModel.OnTurnOffRequested(index);
            PixelColorPickerFlyOut.Hide();
        }
Beispiel #2
0
        /// <summary>
        /// Will be raised if user applies a color with the picker.
        /// It will raise an `OnColorChangeRequested` command.
        /// </summary>
        /// <param name="sender">Sender's button</param>
        /// <param name="e">Event args</param>
        private void ColorPickerApplyButton_Click(object sender, RoutedEventArgs e)
        {
            // Use color pickers tag as index.
            var index = Convert.ToInt32(PixelColorPicker.Tag);
            var color = PixelColorPicker.Color;

            viewModel.OnColorChangeRequested(color, index);
            PixelColorPickerFlyOut.Hide();
        }
Beispiel #3
0
 /// <summary>
 /// Will be raised if user cancels the color picker action.
 /// </summary>
 /// <param name="sender">Sender's button</param>
 /// <param name="e">Event args</param>
 private void ColorPickerCancelButton_Click(object sender, RoutedEventArgs e)
 {
     PixelColorPickerFlyOut.Hide();
 }