【问题标题】:how to change in panorama horizontal width in windows phone 7如何在windows phone 7中更改全景水平宽度
【发布时间】:2012-03-16 01:36:09
【问题描述】:

我想在 WP7 中创建一个全景页面,在内容中使用环绕面板。

我想创建一个类似于 People Hub 的东西,几个 hubtile(即 5 个)并且在宽度上花费大于 1 个单一全景项目的宽度。

我会尝试设置环绕面板宽度、panoramaItem 宽度,但仍然没有机会像在 PeopleHub 中那样工作。

谁能帮我解决这个问题?

【问题讨论】:

    标签: windows-phone-7 wrappanel panorama-control


    【解决方案1】:

    要更改全景项目的宽度,只需设置 Orientation = "Horizo​​ntal"。我想这会解决你的问题。

    问候

    【讨论】:

    • 这行不通!如果只是将“方向”设置为“水平”,它会将下一个 HunTile 带到下一行,它不会增长到下一行。
    【解决方案2】:

    此代码适用于 8 TileButton (Bewise controls),但与 Hubtile 相同

    <controls:PanoramaItem Header="home" Orientation="Horizontal" Width="850">
                    <Grid>
                        <ListBox Margin="0,0,-12,86" ItemsSource="{Binding Children}" Height="380">
                        <ListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <toolkit:WrapPanel Orientation="Horizontal" />
                            </ItemsPanelTemplate>
                        </ListBox.ItemsPanel>
                        <ListBox.Template>
                            <ControlTemplate>
                                <ItemsPresenter />
                            </ControlTemplate>
                        </ListBox.Template>
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Bewise:TileButton ImageSource="{Binding Image}" Text="{Binding Name}" Margin="10" />
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                        <TextBlock Height="48" HorizontalAlignment="Left" Margin="15,389,0,0" Name="textBlock1" Text="view all" VerticalAlignment="Top" FontSize="36" Width="201" />
                    </Grid>
                </controls:PanoramaItem>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-03-26
      • 1970-01-01
      • 1970-01-01
      • 2023-03-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多