开发者

WP7 App: Too large page

I have created a small WP7 app which contains one page which i开发者_如何学Gos dynamically filled with content. But it goes out of viewable area. Emulator doesn't scroll the page when I click-hold-move on the screen. How do I make it scroll when needed?


One simple option is to drop the content you require inside a ScrollViewer, so for example adding a large TextBlock as so:

<ScrollViewer Name="scrollViewer" ScrollViewer.HorizontalScrollBarVisibility="Visible" >
    <TextBlock Height="30" Name="textBlock" FontSize="24"
               Text="This is a long block of text which wont fit in the available area" />
</ScrollViewer>

Obviously, in most cases you will want to drop a container control such as Grid or StackPanel into the ScrollViewer and place all your other controls in there.

That said, I'm wondering if you are actually looking for some of the standard WP7 Metro look and feel controls such as the Panorama and Pivot Controls which are available in the latest dev tools - follow that link for full details.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜