0

从 Visual Studio 中选择新项目时,我想格式化标准 PanoramaApp,但这样做时遇到了麻烦。

我想编辑“第三项”以整齐地显示带有 2 个子标题的边框,这些子标题稍后将用于数据绑定,但是我不知道该怎么做?我尝试过使用列表框/长列表选择器的格式,但似乎无法让我的格式和项目模板正常工作。

所以现在我正在尝试创建一个网格,其中将包含所有带有子标题的不同图片,但是我认为这不是正确的做法

 <phone:PanoramaItem Header="third item" Orientation="Horizontal">
            <!--Double wide Panorama with large image placeholders-->
            <Grid>
                <Grid VerticalAlignment="Top">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <Grid HorizontalAlignment="Left">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Border Grid.Row="0" Background="#FFFFC700" Height="173" Width="173" />
                        <TextBlock Text="Heading1" FontSize="16" HorizontalAlignment="Left"  TextWrapping="Wrap" Grid.Row="1" Margin="0,0,0,0" Width="167"/>
                        <TextBlock Text="Heading2" Grid.Row="2" Margin="12,0,0,0" />
                        <Border Grid.Column="1" Background="#FFFFC700" Height="173" Width="173" Margin="12,0,0,0"/>
                        <Border Grid.Column="2" Background="#FFFFC700" Height="173" Width="173" Margin="12,0,0,0"/>
                        <Border Grid.Column="3" Background="#FFFFC700" Height="173" Width="173" Margin="12,0,0,0"/>
                    </Grid>
                    <StackPanel Grid.Row="1" HorizontalAlignment="Left" Orientation="Horizontal" Margin="0,12,0,0">
                        <Border Background="#FFFFC700" Height="173" Width="173" Margin="12,0,0,0"/>
                        <Border Background="#FFFFC700" Height="173" Width="173" Margin="12,0,0,0"/>
                        <Border Background="#FFFFC700" Height="173" Width="173" Margin="12,0,0,0"/>
                        <Border Background="#FFFFC700" Height="173" Width="173" Margin="12,0,0,0"/>
                    </StackPanel>
                </Grid>
            </Grid>
        </phone:PanoramaItem>
4

1 回答 1

0

您应该能够替换示例:

<Border Background="#FFFFC700" Height="173" Width="173" Margin="12,0,0,0"/>

与以下

<StackPanel>
    <Border Background="#FFFFC700" Height="173" Width="173" Margin="12,0,0,0"/>
    <TextBlock Text="Heading1" FontSize="16" HorizontalAlignment="Left"  TextWrapping="Wrap" Margin="0,0,0,0" Width="167"/>
    <TextBlock Text="Heading2" Margin="12,0,0,0" />
</StackPanel>
于 2013-07-19T18:30:24.037 回答