I’m trying to fill an ellipse with a linear gradient variable in Silverlight(in the .cs file). Here is what I have tried…
newEllipse.Fill = ballBG;
However, this removes the fill that is already on the ellipse. I also tried…
newEllipse.Background = ballBG;
However, it comes up with this error…’System.Windows.Shapes.Ellipse’ does not contain a definition for ‘Background’ and no extension method ‘Background’ accepting a first argument of type ‘System.Windows.Shapes.Ellipse’ could be found (are you missing a using directive or an assembly reference?)
Any advice on how to do it?
When having a SolidColorBrush:
UPDATE
For your LinearGradientBrush I found this: