I have a rss which has following tag,I read all SubHeading Name and bind it to a Silverlight TextBlock control,In texblock Special Charecter(&) is also displaying currently. I want to display & in place of &, < in place of < and all this type of cherecter.
I want to know, how i can solve it.
rajeevsys@li...
Member
2 Points
6 Posts
displaying special charecter in TextBlock control.
Aug 31, 2009 08:15 AM | LINK
neal.gabriel
Contributor
4520 Points
789 Posts
Re: displaying special charecter in TextBlock control.
Aug 31, 2009 08:27 AM | LINK
Use
<
TextBlock Text="This & that"/>Neal Gabriel
Follow me on twitter
My Blog
rajeevsys@li...
Member
2 Points
6 Posts
Re: displaying special charecter in TextBlock control.
Aug 31, 2009 08:34 AM | LINK
neal.gabriel
Contributor
4520 Points
789 Posts
Re: Re: displaying special charecter in TextBlock control.
Aug 31, 2009 08:43 AM | LINK
The methods I tried include
<
TextBlock Text="{Binding MySpecialChar}"/> private string _mySpecialChar;public string MySpecialChar{
get { return _mySpecialChar; } set { _mySpecialChar = value; }}
MySpecialChar =
"This & that";----- This Worked fine -----
<
TextBlock x:Name="lblSpecialChar"/> lblSpecialChar.Text = "This & that"; ---- Even this worked fine;<TextBlock x:Name="lblSpecialChar"/>
string strSpecialChar = "This & that";lblSpecialChar.Text = strSpecialChar;
--- This too worked fine. ..Neal Gabriel
Follow me on twitter
My Blog