private void RadioButtonEnter(object sender, RoutedEventArgs e) { Border border = sender as Border; Colorpicker colorPicker = new Colorpicker(border.Background); border.Background = colorPicker.dark(); }
private void ButtonEnter(object sender, RoutedEventArgs e) { Console.WriteLine("ButtonEnter"); Button myButton = sender as Button; Brush buttonDark = myButton.Background; Colorpicker colorPicker = new Colorpicker(buttonDark); myButton.Background = colorPicker.dark(); }
private void DefaultRadioButtonBorderLoaded(object sender, RoutedEventArgs e) { Border border = sender as Border; Border childBorder = border.FindName("RadioMark") as Border; Colorpicker colorPicker = new Colorpicker(border.BorderBrush); //Colorpicker newColorPicker = new Colorpicker(colorPicker.darker()); childBorder.Background = colorPicker.dark(); }
private void MenuItemHighlighted(object sender, RoutedEventArgs e) { Console.WriteLine("KeyBoard Focused!!"); MenuItem menuItem = sender as MenuItem; Brush itemColor = menuItem.Background; Colorpicker colorPicker = new Colorpicker(itemColor); menuItem.Background = colorPicker.dark(); }
private void MenuMouseEnter(object sender, RoutedEventArgs e) { Console.WriteLine("MouseEnter"); MenuItem menuItem = sender as MenuItem; Brush menuItemColor = menuItem.Background; Colorpicker colorPicker = new Colorpicker(menuItemColor); menuItem.Background = colorPicker.dark(); Console.WriteLine(menuItem.Background); }
//-----------------------------------------------Events for radio button ends here------------------------------------------------- private void CheckBoxMouseEnter(object sender, RoutedEventArgs e) { CheckBox checkBox = sender as CheckBox; Console.WriteLine("Mouse Enter CheckBox"); Colorpicker colorPicker = new Colorpicker(checkBox.Background); checkBox.Background = colorPicker.dark(); }
private void ButtonGroupMouseEnter(object sender, RoutedEventArgs e) { //Creating the borderbrush.. RadioButton border = sender as RadioButton; //Getting the darker color of the background.. Colorpicker colorPicker = new Colorpicker(border.Background); border.Background = colorPicker.dark(); }
private void TabRadioButtonMouseEnter(object sender, RoutedEventArgs e) { RadioButton button = sender as RadioButton; Console.WriteLine("TabRadioButton Mouse Enter "); BulletDecorator bullet = VisualTreeHelper.GetChild(button, 0) as BulletDecorator; Border border = VisualTreeHelper.GetChild(bullet, 0) as Border; Colorpicker colorPicker = new Colorpicker(border.Background); border.Background = colorPicker.dark(); }
//------------------------------------------------BUTTONGROUP REGION START--------------------------------------------------------------------------------- private void ButtonGroupLoaded(object sender, RoutedEventArgs e) { //Creating the borderbrush.. Border border = sender as Border; //Getting the darker color of the background.. Colorpicker colorPicker = new Colorpicker(border.Background); RadioButton button = VisualTreeHelper.GetParent(border) as RadioButton; if (button.IsChecked == true) { border.BorderBrush = colorPicker.light(); } else { border.BorderBrush = colorPicker.dark(); } }
private void RadioButtonUp(object sender, RoutedEventArgs e) { Console.WriteLine("In button up property"); //Checking the IsChecked property.... CustomPanel stackPanel = sender as CustomPanel; Border radioButtonEnable = stackPanel.FindName("EnableButton") as Border; Border radioButtonDisable = stackPanel.FindName("DisableButton") as Border; Border radioButton; Boolean EnabledFlag = true; try { ContentPresenter myContent = e.Source as ContentPresenter; Console.WriteLine(myContent.Content); if ((String)myContent.Tag == "Disable") { EnabledFlag = false; } else { EnabledFlag = true; } } catch (Exception) { Border myBorder = e.Source as Border; if ((String)myBorder.Tag == "Disable") { EnabledFlag = false; } else { EnabledFlag = true; } } if (EnabledFlag) { radioButton = radioButtonEnable; Colorpicker colorPicker = new Colorpicker(radioButton.Background); radioButton.Background = colorPicker.lighter(); } else { radioButton = radioButtonDisable; Colorpicker colorPicker = new Colorpicker(radioButton.Background); radioButton.Background = colorPicker.lighter(); } Console.WriteLine("PrevCheck value is " + stackPanel.PrevCheck); if (stackPanel.PrevCheck) { if (EnabledFlag) { Console.WriteLine("I am inside enabled flag background"); Colorpicker colorPicker = new Colorpicker(radioButtonDisable.Background); radioButtonEnable.Background = colorPicker.dark(); radioButtonDisable.Background = new SolidColorBrush(Color.FromRgb(219, 219, 224)); stackPanel.PrevCheck = false; } } if (stackPanel.PrevCheck == false) { if (EnabledFlag == false) { Console.WriteLine("I am inside disabled flag background"); Colorpicker colorPicker = new Colorpicker(radioButtonEnable.Background); radioButtonDisable.Background = colorPicker.dark(); radioButtonEnable.Background = new SolidColorBrush(Color.FromRgb(219, 219, 224)); stackPanel.PrevCheck = true; } } }