System.Windows.Media.Color.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
		public override string ToString ()
		{
			return String.Format ("#{0:X8}", argb);
		}

Same methods

Color::ToString ( IFormatProvider provider ) : string

Usage Example

 private void Color_Changed(object sender, RoutedPropertyChangedEventArgs <double> e)
 {
     try
     {
         int  num1 = (int)(byte)this.sliderA.Value;
         byte num2 = (byte)this.sliderR.Value;
         byte num3 = (byte)this.sliderG.Value;
         byte num4 = (byte)this.sliderB.Value;
         int  num5 = (int)num2;
         int  num6 = (int)num3;
         int  num7 = (int)num4;
         System.Windows.Media.Color color = System.Windows.Media.Color.FromArgb((byte)num1, (byte)num5, (byte)num6, (byte)num7);
         this.gridColor.Background = (Brush) new SolidColorBrush(color);
         if (this.ignore)
         {
             return;
         }
         this.textBox.Text = color.ToString((IFormatProvider)CultureInfo.InvariantCulture);
         BlueStacksUIColorManager.AppliedTheme.DictBrush[this.dataGrid.CurrentRow.Cells["Name"].Value.ToString()] = (Brush) new SolidColorBrush(new ColorUtils(color).WPFColor);
         if (this.dataGrid.CurrentRow.Cells["Category"].Value.ToString().Equals("*MainColors*", StringComparison.OrdinalIgnoreCase))
         {
             BlueStacksUIColorManager.AppliedTheme.CalculateAndNotify(true);
         }
         else
         {
             BlueStacksUIColorManager.AppliedTheme.NotifyUIElements();
         }
     }
     catch (Exception ex)
     {
     }
 }
All Usage Examples Of System.Windows.Media.Color::ToString