I am making some things in silverligth with marked up text in XAML. Everything is going fine until i came up with this.
I am trying to give my text a background color but it says the property does not exist. the property for a foreground does exist.
is there a way to still give my text parts a background color?
image in link: http://img146.imageshack.us/img146/537/highligths.png
This is one of those annoying Silverlight vs. WPF differences. Neither TextBlock nor Run elements provide a Background property in Silverlight. You need to wrap them in a Border:
<Border Background="Red">
<TextBlock>Test please ignore</TextBlock>
</Border>
Thus it's annoyingly involved to do precisely what you want, but possible. If the text you want to display is not well known ahead of time, your best bet is to look at a third party RichTextBox control such as Telerik's RadRichTextBox.