我想从visual studio中选择新项目时格式化标准PanoramaApp,但是我很难这样做。
我想编辑“第三项”以显示带有2个副标题的边框,这些副标题稍后将用于数据绑定,但我不知道该怎么做?我尝试过使用listbox / longlistselector的格式,但似乎无法使我的格式和项目模板起作用。
所以现在我正在尝试创建一个网格,其中包含带有副标题的所有不同图片,但我不认为这是正确的方法
<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>
答案 0 :(得分: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>