currently i have a textblock placed in a scroll viewer control. How do i make the textblock read only?
making textblock readonly
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?
oh ok thanks for your info. because i read from somewhere in order to make textblock text selectable i have to make the textblock read only –
Cattleman
If that is what you want, you should use the TextBOX control (I provided a link in my answer) and set IsReadOnly="true" on that new TextBox control. That will do what you want. –
Wien
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.
© 2022 - 2024 — McMap. All rights reserved.