Donate

WPF How To Set Color Value Using Hexademical Value

Here's a snippet that passes a hexa color and set a wpf control object's background/foreground property.
BrushConverter bc = new BrushConverter();   
Brush brush;   
brush = (Brush)bc.ConvertFrom("#003F87");   
notes.SetValue(TextBlock.BackgroundProperty, brush);
Original Source: http://jammer.biz/blog2/?p=169
Greg

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

Remove Cookies From CookieContainer Class

How To Test Or Check Dead Pixels And Backlight Bleed On Your Monitor Using Dead Pixel Checker In Windows 11