0

I have a ContentControl, which I use the Content Property to place some geometry inside (path, ellipses etc).

I need to make a "copy" of the content in a different color... for example, if i have a red ellipse inside the control, i would like to copy that ellipse in a blue color.

We do this when we have a colored pic, and we convert them to an black/white pic. I have thought about the visualBrush, but not the best aproach and until now, i havent find a good solution.

Any ideas?

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
  • Why not just change the brush used in the path or geometry? – Ed Bayiates Jun 21 '11 at 01:42
  • The control has a property called BodyColor, used to paint the path. I could of course use the BodyColor to change the path color, but, because im editing BodyColor in a propertyGrid, this isnt the best approach... the idea is to make a copy with a different color... –  Jun 21 '11 at 02:44
  • 1
    Well you could make two copies of the control, place them at the same spot and use the Visibility property to decide which one was visible, and then change the BodyColor property on one of them. – Ed Bayiates Jun 21 '11 at 02:51
  • thats a good option, thank you!! –  Jun 22 '11 at 23:34
  • I posted that as an answer since you thought it was good. – Ed Bayiates Jun 22 '11 at 23:43

1 Answers1

1

Make two copies of the control, place them at the same spot, and then use the Visibility property to decide which one is visible. Change the BodyColor property on one of them to get the different color effect.

Ed Bayiates
  • 11,060
  • 4
  • 43
  • 62