jeremychan
jeremychan

Reputation: 4459

Making textblock scroll

i currently have a textblock that is embedded in a large grid. I have read some post with regards to adding a grid/dockpanels and put the textblock inside.

In my XAML,

if i do this:

<Grid name="Large">
   <Scrollviewer>
      <Grid name="Small">
         <Textblock/>
      </Grid>
   </Scrollviewer>
</Grid>

i will get the vertical scroll bars in the "large" grid. My objective is to get scroll bars in the "small" grid. Anybody has any idea?

Upvotes: 1

Views: 1221

Answers (1)

brunnerh
brunnerh

Reputation: 184296

Move it down a level:

<Grid name="Large">
   <Grid name="Small">
       <Scrollviewer>
          <Textblock />
       </Scrollviewer>
   </Grid>
</Grid>

Upvotes: 1

Related Questions