Q: how do i change color of label in wpf using vb I'm converting an application from winforms to wpf and the app changes the color of some labels. In winforms you'd use lblName.ForeColor = Color.Red. But in WPF the Color.Red isn't correct. I can't seem to find the WPF version of this. Most of the sites I can find use C# instead of VB.
The XAML code for a label that needs to change color:
<Label x:Name="lblMsg" Content="Label4" Foreground="Red" Margin="34,562,542.4,71.8"/>

The VB code that should change the color of this label:
 lblMsg.Foreground = Color.Green


A: Never mind, I figured it out at last.
this:
lblMsg.Foreground = Color.Green

should be this:
lblMsg.Foreground = Brushes.Green


A: Here's solution for your problem:
lblMsg.Foreground = New SolidColorBrush(Colors.Green)

or
lblMsg.Foreground = Brushes.Green

