As you know that Silverlight textblock does not have any styling provision, you cannot have background or border set for Textblock. To come over this limitation, I have used a TextBox with its properties IsReadOnly set to True and IsEnabled set to False. I am providing a style which you can apply directly to a textbox. Only thing you need to do is that use textbox instead of textblock where you required some stylized textblock.
You can user the xaml file which contains style and Textbox indicating how to use the same.
Here is the url:
http://cid-cd9cdbf38105503c.skydrive.live.com/self.aspx/Blog%20Posts/ReadOnlyTextBlock%20Style.txt
Tuesday, February 9, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment