Hi
Can anyone help.
I have a several buttons on a WPF window that I have used a horizontal Linear Gradient Bursh on when placing them on the form, using the property box.
When the button has been clicked I want the color of the gradient to change, I no longer want to to appear as Gold to White, the colour before it is clicked, I now want to to go from Green to White.
I am having real problems trying to make the brush, I am importing System.Drawing and System.Drawing.Drawing2D and the code I am trying to use is below.
Dim linGrBrush As New LinearGradientBrush(New System.Drawing.Point(0, 1), New System.Drawing.Point(0, 0), System.Drawing.Color.ForestGreen, System.Drawing.Color.White)
If ntControl.IntroComp = True Then
btnLesson1.Visibility = Windows.Visibility.Visible
btnIntroduction.Background = linGrBrush
End If
The error I am getting says that type System.Drawing.Drawing2D.LinearGradientBrush cannot be converted to System.Windows.MediaBrush.
I am sorry if the error I am making is simple but I am pretty new to WPF all I want to do is change the background of the button.
Any Help would be much appreciated.
Kind Regards
Dave