2013-07-19 111 views
0

我想在從Visual Studio中選擇新項目時對標準PanoramaApp進行格式設置,但這樣做時遇到問題。Panoramaview造型問題

我想編輯「第三項」以顯示帶有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

的正確方法應該能夠取代示例:

<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> 
+0

喜,thanx的答覆,這是一種世界衛生大會我需要,但是2個標題現在已超過邊界,我需要它專門位於不同的塊之下,但未設置具體位置 – Bohrend

+0

查看更新的答案 –