原文:C# 16进制转 Brush 颜色对象

版权声明:本文为博主原创文章,未经博主允许不得转载。https://blog.csdn.net/u014117094/article/details/48135045

代码图如下:

C# 16进制转 Brush 颜色对象-LMLPHP

C# 16进制转 Brush 颜色对象-LMLPHP

代码片如下:

BrushConverter brushConverter = new BrushConverter();

                PopupBorder.Background = (Brush)brushConverter.ConvertFromString("#121212");

                MessageLabel.Foreground = (Brush)brushConverter.ConvertFromString("#7d7d7d");

04-17 06:59