How to set LinearGradientBrush in UWP

  • Thread starter Thread starter Shay_w
  • Start date Start date
S

Shay_w

Guest
Hi

It's an xaml uwp project i tried to fill a polygon with a lineargradientbrush.

I tried to set a lineargradientbrush using vb.net code

Private brushseg As LinearGradientBrush
Private gradient As GradientStop

Try
brushseg = New LinearGradientBrush With {
.StartPoint = New Point(0, 0),
.EndPoint = New Point(1, 1)
}
gradient = New GradientStop
gradient.Color = Windows.UI.Colors.LightGoldenrodYellow
gradient.Offset = 0.2
brushseg.GradientStops.Add(gradient)
Catch ex As Exception
Dim mes As New MessageDialog(ex.Message)

End Try
The debugger stops at line brushseg.GradientStops.Add(gradient)

and throws to Global.System.Diagnostics.Debugger.Break()

what's wrong ?


Thanks




Continue reading...
 
Back
Top