making textblock readonly
currently i have a textblock placed in a scroll viewer control. How 开发者_开发知识库do i make the textblock read only?
Textblocks are already readonly. They are intended to display a small amount of flow text. Perhaps you thought you were dealing with a TextBox instead?
BinaryTox1n answered your question, but if you need the text to be selectable see the previous StackOverflow question.
Bind the Textblock to a property with only a getter and it will be a readonly textblock.
精彩评论