2021
01-17
01-17
C# wpf Brush转Hex字符串的实例代码
我就废话不多说了,大家还是直接看代码吧~//fromMaterialDesignDemo.ConverterspublicclassBrushToHexConverter:IValueConverter{publicobjectConvert(objectvalue,TypetargetType,objectparameter,CultureInfoculture){if(value==null)returnnull;stringlowerHexString(inti)=>i.ToString("X2").ToLower();varbrush=(SolidColorBrush)value;varhex=lowerHexString(brush.Color.R)...
继续阅读 >