ColorHelper.HexToBrush method
小于 1 分钟
ColorHelper.HexToBrush method
将16进制ARGB或RGB颜色字符串转换为SolidColorBrush
public static SolidColorBrush HexToBrush(string hexColor)| parameter | description |
|---|---|
| hexColor | 颜色字符串 |
Return Value
SolidColorBrush
Exceptions
| exception | condition |
|---|---|
| ArgumentException | 颜色字符串不能为空 |
| ArgumentException | 颜色字符串格式不正确 |
| ArgumentException | 颜色字符串包含非16进制字符 |
| ArgumentException | 颜色值超出范围 |
See Also
- class ColorHelper
- namespace neo_bpsys_wpf.Core.Helpers
