开发者

WP7 PanoramaItem with Icon/Button next to Header

开发者 https://www.devze.com 2023-02-01 17:42 出处:网络
Windows Phone 7\'s People hub has an \"all\" panorama item with \"search\" and a \"new\" buttons right next to the header/title.

Windows Phone 7's People hub has an "all" panorama item with "search" and a "new" buttons right next to the header/title.

I can't seem to accomplish this with PanoramaItem in Visual Studio using the standard Panorama control. I don't know enough Silverlight/WPF either to be able to position something manually and control transitions/movement correctly.

How can I set a button (or any object, for that mat开发者_运维技巧ter) to go alongside the header of a wp7 PanoramaItem?

Thanks!


A PanoramaItem Header doesn't have to be a string. It could be another StackPanel that has a CheckBox in it if you wanted, something like this:

<controls:PanoramaItem>
    <controls:PanoramaItem.Header>
        <StackPanel Orientation="Horizontal">
            <TextBlock>Item</TextBlock>
            <CheckBox>CheckBox</CheckBox>
        </StackPanel>
    </controls:PanoramaItem.Header>
    <Grid>
        <TextBlock>Your Content</TextBlock>
    </Grid>
</controls:PanoramaItem>

So you can basically put anything in there that you want. Images, buttons, checkboxes, etc.

0

精彩评论

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