tags:

views:

32

answers:

1

Hi all,

I have this Ellipse which I turned into a custom control so i could animate it programatically. However I am having trouble changing it's color.

I know about changing a shapes color like this:

aRectangle.Fill = new SolidColorBrush(Colors.Blue);

However I cannot do this with a custom control.

Anyone know how? Thanks.

A: 

How you set the color would depend on the template for the control, but in general I believe there is a Foreground brush property on the Control class. You should probably have all of the parts of your template honor this property so the entire control is colored properly.

Dan Auclair