132 references to ColorTranslator
System.Drawing (1)
commonui\System\Drawing\Bitmap.cs (1)
422ColorTranslator.ToWin32(background));
System.Web (19)
UI\WebControls\Calendar.cs (3)
947sb.Append(foreColor.IsEmpty ? defaultButtonColorText : ColorTranslator.ToHtml(foreColor)); 1254defaultButtonColorText = ColorTranslator.ToHtml(defaultForeColor); 1327writer.Write(foreColor.IsEmpty ? defaultButtonColorText : ColorTranslator.ToHtml(foreColor));
UI\WebControls\HyperLinkStyle.cs (1)
87attributes.Add(HtmlTextWriterStyle.Color, ColorTranslator.ToHtml(c));
UI\WebControls\MenuItemStyle.cs (2)
171attributes.Add(HtmlTextWriterStyle.BackgroundColor, ColorTranslator.ToHtml(c)); 179attributes.Add(HtmlTextWriterStyle.BorderColor, ColorTranslator.ToHtml(c));
UI\WebControls\PopOutPanel.cs (1)
156writer.AddStyleAttribute(HtmlTextWriterStyle.BackgroundColor, ColorTranslator.ToHtml(BackColor));
UI\WebControls\Style.cs (3)
532attributes.Add(HtmlTextWriterStyle.Color, ColorTranslator.ToHtml(c)); 540attributes.Add(HtmlTextWriterStyle.BackgroundColor, ColorTranslator.ToHtml(c)); 548attributes.Add(HtmlTextWriterStyle.BorderColor, ColorTranslator.ToHtml(c));
UI\WebControls\SubMenuStyle.cs (2)
127attributes.Add(HtmlTextWriterStyle.BackgroundColor, ColorTranslator.ToHtml(c)); 135attributes.Add(HtmlTextWriterStyle.BorderColor, ColorTranslator.ToHtml(c));
UI\WebControls\Table.cs (1)
235writer.AddAttribute(HtmlTextWriterAttribute.Bordercolor, ColorTranslator.ToHtml(borderColor));
UI\WebControls\TreeNodeStyle.cs (2)
225attributes.Add(HtmlTextWriterStyle.BackgroundColor, ColorTranslator.ToHtml(c)); 233attributes.Add(HtmlTextWriterStyle.BorderColor, ColorTranslator.ToHtml(c));
UI\WebParts\WebPartManager.cs (1)
3871dragHighlightColor = ColorTranslator.ToHtml(zone.DragHighlightColor);
UI\WebParts\WebPartMenu.cs (1)
62labelHoverColor = ColorTranslator.ToHtml(foreColor);
UI\WebParts\WebPartMenuStyle.cs (1)
74string colorValue = ColorTranslator.ToHtml(shadowColor);
UI\WebParts\WebPartZoneBase.cs (1)
1326string color = ColorTranslator.ToHtml(DragHighlightColor);
System.Web.DataVisualization (1)
WebForm\General\ChartHttpHandler.cs (1)
654result.RowStyle.BackColor = ColorTranslator.FromHtml("#efefef");
System.Web.Mobile (15)
UI\MobileControls\Adapters\HtmlFormAdapter.cs (1)
89bodyAttributes.Add("bgcolor", ColorTranslator.ToHtml(backColor));
UI\MobileControls\Adapters\HtmlMobileTextWriter.cs (1)
1318ColorTranslator.ToHtml(newStyle.FontColor));
UI\MobileControls\Adapters\HtmlObjectListAdapter.cs (1)
526writer.Write((foreColor != Color.Empty) ? ColorTranslator.ToHtml(foreColor) : "#000000");
UI\MobileControls\Adapters\XhtmlAdapters\XhtmlStyleClass.cs (2)
122classBuilder.Append ("background-color: " + ColorTranslator.ToHtml (styleColor).ToLower(CultureInfo.InvariantCulture) + ";\r\n"); 132classBuilder.Append ("color: " + ColorTranslator.ToHtml (styleColor).ToLower(CultureInfo.InvariantCulture) + ";\r\n");
UI\MobileControls\Design\Adapters\DesignerAdapterUtil.cs (1)
245behavior.SetStyleAttribute("borderColor", true, ColorTranslator.ToHtml(c), true);
UI\MobileControls\Design\Adapters\DesignerTextWriter.cs (4)
88Write(";background-color:" + ColorTranslator.ToHtml(backColor)); 153Write(ColorTranslator.ToHtml(foreColor)); 160Write(ColorTranslator.ToHtml(backColor)); 163Write(ColorTranslator.ToHtml(backColor));
UI\MobileControls\Design\MobileContainerDesigner.cs (3)
171SetBehaviorStyle("backgroundColor", ColorTranslator.ToHtml(backColor)); 176SetBehaviorStyle("color", ColorTranslator.ToHtml(foreColor)); 618SetBehaviorStyle("borderColor", ColorTranslator.ToHtml(SystemColors.ControlDark));
UI\MobileControls\Design\StylesEditorDialog.cs (2)
576tw.AddStyleAttribute("color", ColorTranslator.ToHtml(c)); 583tw.AddStyleAttribute("background-color", ColorTranslator.ToHtml(c));
System.Windows.Forms (95)
misc\GDI\DeviceContext2.cs (6)
66return ColorTranslator.FromWin32(IntUnsafeNativeMethods.GetBkColor( new HandleRef( this, this.Hdc ))); 81return ColorTranslator.FromWin32(IntUnsafeNativeMethods.SetBkColor( new HandleRef( this, this.Hdc ), ColorTranslator.ToWin32(newColor))); 419return ColorTranslator.FromWin32(IntUnsafeNativeMethods.GetTextColor( new HandleRef( this, this.Hdc ) )); 434return ColorTranslator.FromWin32(IntUnsafeNativeMethods.SetTextColor(new HandleRef( this, this.Hdc), ColorTranslator.ToWin32(newColor)));
misc\GDI\WindowsGraphics2.cs (2)
299int colorResult = IntUnsafeNativeMethods.GetNearestColor(hdc, ColorTranslator.ToWin32(color)); 300return ColorTranslator.FromWin32(colorResult);
misc\GDI\WindowsPen.cs (2)
121this.nativeHandle = IntSafeNativeMethods.CreatePen((int) this.style, this.width, ColorTranslator.ToWin32(this.color) ); 127lb.lbColor = ColorTranslator.ToWin32( this.wndBrush.Color );
misc\GDI\WindowsSolidBrush.cs (1)
35IntPtr nativeHandle = IntSafeNativeMethods.CreateSolidBrush(ColorTranslator.ToWin32( this.Color));
winforms\Managed\System\WinForms\AxHost.cs (2)
4903return ColorTranslator.FromOle((int)color); 4913return (uint)ColorTranslator.ToOle(color);
winforms\Managed\System\WinForms\ButtonInternal\ButtonStandardAdapter.cs (1)
101isHighContrastHighlighted ? SafeNativeMethods.GetSysColorBrush(ColorTranslator.ToOle(color) & 0xFF) : Control.BackColorBrush));
winforms\Managed\System\WinForms\ColorDialog.cs (3)
287cc.rgbResult = ColorTranslator.ToWin32(color); 298if (cc.rgbResult != ColorTranslator.ToWin32(color)) color = ColorTranslator.FromOle(cc.rgbResult);
winforms\Managed\System\WinForms\ComboBox.cs (2)
2211SafeNativeMethods.SetTextColor(new HandleRef(null, dc), ColorTranslator.ToWin32(ForeColor)); 2212SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(BackColor));
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2ColorConverter.cs (2)
50return ColorTranslator.FromOle(intVal); 68return ColorTranslator.ToOle(((Color)managedValue));
winforms\Managed\System\WinForms\Control.cs (9)
1055if (ColorTranslator.ToOle(color) < 0) { 1056backBrush = SafeNativeMethods.GetSysColorBrush(ColorTranslator.ToOle(color) & 0xFF); 1060backBrush = SafeNativeMethods.CreateSolidBrush(ColorTranslator.ToWin32(color)); 7142SafeNativeMethods.SetTextColor(new HandleRef(null, dc), ColorTranslator.ToWin32(ForeColor)); 7143SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(BackColor)); 16336prop.Value = ColorTranslator.FromOle(Convert.ToInt32(obj, CultureInfo.InvariantCulture)); 16418prop.Value = ColorTranslator.FromOle(Convert.ToInt32(obj, CultureInfo.InvariantCulture)); 17618prop.Value = ColorTranslator.FromOle(unchecked((int)pQaContainer.colorBack)); 17621prop.Value = ColorTranslator.FromOle(unchecked((int)pQaContainer.colorFore));
winforms\Managed\System\WinForms\ControlPaint.cs (6)
343lb.lbColor = ColorTranslator.ToWin32(Color.Black); 1788pen = SafeNativeMethods.CreatePen(NativeMethods.PS_DOT, 1, ColorTranslator.ToWin32(backColor)); 1793pen = SafeNativeMethods.CreatePen(NativeMethods.PS_SOLID, 2, ColorTranslator.ToWin32(backColor)); 1800SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(graphicsColor)); 1827IntPtr pen = SafeNativeMethods.CreatePen(NativeMethods.PS_SOLID, 1, ColorTranslator.ToWin32(backColor)); 2008IntPtr brush = SafeNativeMethods.CreateSolidBrush(ColorTranslator.ToWin32(backColor));
winforms\Managed\System\WinForms\DateTimePicker.cs (1)
1397SendMessage(NativeMethods.DTM_SETMCCOLOR, colorIndex, ColorTranslator.ToWin32(value));
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (6)
745savedColor = SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(SystemColors.ControlLightLight)); 756SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(SystemColors.ControlDark)); 809state, ColorTranslator.ToWin32(SystemColors.Control), ColorTranslator.ToWin32(SystemColors.ControlText)); 839oldTextColor = SafeNativeMethods.SetTextColor(new HandleRef(null, dc), ColorTranslator.ToWin32(SystemColors.ControlLightLight)); 840oldBackColor = SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(SystemColors.Control));
winforms\Managed\System\WinForms\FontDialog.cs (6)
175return ColorTranslator.FromWin32(ColorTranslator.ToWin32(color)); 594cf.rgbColors = ColorTranslator.ToWin32(color); 597cf.rgbColors = ColorTranslator.ToWin32(SystemColors.ControlText); 674if (ColorTranslator.ToWin32(color) != rgb) { 675color = ColorTranslator.FromOle(rgb);
winforms\Managed\System\WinForms\Form.cs (2)
6462result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), ColorTranslator.ToWin32(transparencyKey), 0, NativeMethods.LWA_COLORKEY); 6465result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), ColorTranslator.ToWin32(transparencyKey),
winforms\Managed\System\WinForms\ListView.cs (14)
386SendMessage(NativeMethods.LVM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor)); 855SendMessage(NativeMethods.LVM_SETTEXTCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 2776nmcd->clrText = ColorTranslator.ToWin32(odCacheForeColor); 2780nmcd->clrText = ColorTranslator.ToWin32(riFore); 2791if (nmcd->clrText == ColorTranslator.ToWin32(SystemColors.HotTrack)) 2829nmcd->clrTextBk = ColorTranslator.ToWin32(odCacheBackColor); 2833nmcd->clrTextBk = ColorTranslator.ToWin32(riBack); 4266int color = ColorTranslator.ToWin32(BackColor); 4268SendMessage(NativeMethods.LVM_SETTEXTCOLOR,0,ColorTranslator.ToWin32(base.ForeColor)); 4551int color = ColorTranslator.ToWin32(BackColor); 4644SendMessage(NativeMethods.LVM_SETBKCOLOR, 0, ColorTranslator.ToWin32(c)); 4648SendMessage(NativeMethods.LVM_SETTEXTCOLOR, 0, ColorTranslator.ToWin32(c)); 5478Color foreColor = ColorTranslator.FromWin32(SafeNativeMethods.GetTextColor(new HandleRef(this, nmcd->hdc))); 5479Color backColor = ColorTranslator.FromWin32(SafeNativeMethods.GetBkColor(new HandleRef(this, nmcd->hdc)));
winforms\Managed\System\WinForms\MonthCalendar.cs (1)
1979SendMessage(NativeMethods.MCM_SETCOLOR, colorIndex, ColorTranslator.ToWin32(value));
winforms\Managed\System\WinForms\ProgressBar.cs (6)
453UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor)); 462UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 788UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor)); 789UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 893UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 894UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor));
winforms\Managed\System\WinForms\RichTextBox.cs (9)
1004selColor = ColorTranslator.FromOle(cf.crTextColor); 1013cf.crTextColor = ColorTranslator.ToWin32(value); 1041selColor = ColorTranslator.FromOle(cf2.crBackColor); 1064cf2.crBackColor = ColorTranslator.ToWin32(value); 2233&& ColorTranslator.ToWin32(value) == cf.crTextColor) { 2240cf.crTextColor = ColorTranslator.ToWin32(value); 2464SendMessage(RichTextBoxConstants.EM_SETBKGNDCOLOR, 0, ColorTranslator.ToWin32(BackColor)); 2568SendMessage(RichTextBoxConstants.EM_SETBKGNDCOLOR, 0, ColorTranslator.ToWin32(BackColor)); 3303SendMessage(RichTextBoxConstants.EM_SETBKGNDCOLOR, 0, ColorTranslator.ToWin32(BackColor));
winforms\Managed\System\WinForms\ToolTip.cs (4)
225UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPBKCOLOR, ColorTranslator.ToWin32(backColor), 0); 290UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPTEXTCOLOR, ColorTranslator.ToWin32(foreColor), 0); 929UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPBKCOLOR, ColorTranslator.ToWin32(BackColor), 0); 932UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPTEXTCOLOR, ColorTranslator.ToWin32(ForeColor), 0);
winforms\Managed\System\WinForms\TreeView.cs (9)
212SendMessage(NativeMethods.TVM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor)); 465SendMessage(NativeMethods.TVM_SETTEXTCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 868return ColorTranslator.FromWin32(intColor); 876SendMessage(NativeMethods.TVM_SETLINECOLOR, 0, ColorTranslator.ToWin32(lineColor)); 2006SendMessage(NativeMethods.TVM_SETBKCOLOR, 0, ColorTranslator.ToWin32(c)); 2010SendMessage(NativeMethods.TVM_SETTEXTCOLOR, 0, ColorTranslator.ToWin32(c)); 2014SendMessage(NativeMethods.TVM_SETLINECOLOR, 0, ColorTranslator.ToWin32(lineColor)); 2781nmcd.clrText = ColorTranslator.ToWin32(riFore); 2785nmcd.clrTextBk = ColorTranslator.ToWin32(riBack);
winforms\Managed\System\WinForms\VisualStyles\VisualStyleRenderer.cs (1)
621return ColorTranslator.FromWin32(color);
System.Workflow.ComponentModel (1)
AuthoringOM\Design\DesignerHelpers.cs (1)
1114IntPtr penPtr = NativeMethods.ExtCreatePen(NativeMethods.PS_COSMETIC | NativeMethods.PS_USERSTYLE | penStyle, 1, new NativeMethods.LOGBRUSH(NativeMethods.BS_SOLID, ColorTranslator.ToWin32(pen.Color), 0), 2, new int[] { 1, 1 });