Get Brush For Hex - CSharp System.Windows.Media

CSharp examples for System.Windows.Media:Brush

Description

Get Brush For Hex

Demo Code


using System.Windows.Media;
using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;/*from ww  w .  j  a  v  a2  s.  c  om*/

public class Main{
        public static SolidColorBrush GetBrushForHex(string hex)
        {
            return (SolidColorBrush)(new BrushConverter().ConvertFrom(hex));
        }
}

Related Tutorials