Silverlight textblock scroll bar

Source: Internet
Author: User

Http://hi.baidu.com/%C4%FE%CE%A8%CA%C7%C4%FE%CE%A8/blog/item/d9e06880c5908cb16d811973.html

Unlike winform, textblock in sl3 is embedded in a fixed height or width control (such as grid.

Because textblock does not contain its own scroll bar (maybe I didn't find this attribute. Therefore, it must be implemented in other ways.

You can usually use the scrollviewer control. Put textblock under the content of scrollviewer.

Important attributes of scroolviewer:

Scrollviewer. content: content in the scrollviewer Control

Horizontalscrollbarvisibility: displays the status of the horizontal scroll bar.
Verticalscrollbarvisibility: Display status of the vertical scroll bar
(Auto-automatically determines whether to display the scroll bar based on the width and height of scrollviewer and the width and height of the content.
Disabled-do not display, but you can move or drag the keyboard or mouse in the displayed content to see the blocked content

Hidden-do not display, and cannot see the blocked content
Visible-display the scroll bar)

 

 

Such as code:

<Grid width = "180" Height = "220">

<Scrollviewer width = "180" Height = "220">
<Scrollviewer. content>
<Textblock X: Name = "textblock" margin = "10"
Foreground = "# fff612eb" textwrapping = "Wrap"
TEXT = "XX"
Fontsize = "20"
/>
</Scrollviewer. content>
</Scrollviewer>

</GRID>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.