1

I could only find xaml specifiy solutions to this problem using TextElement.Foreground="...".
But I'd like to set the Foreground of a ContentPresenter in C#.
Can you tell me how that works?

Thank you very much!

Noel Widmer
  • 4,444
  • 9
  • 45
  • 69

1 Answers1

0

Attached properties is what you are looking for. You can check msdn

In general, you'll want to do something like myContentPresenter.SetValue(ForegroundProperty, myForeground)

Alex K.
  • 784
  • 5
  • 12