2013-02-05 46 views

回答

2

如果這是你想做的事: enter image description here

你只需要改變全景元素的樣式。

這裏是上述

<Grid x:Name="LayoutRoot"> 
    <Grid.Resources> 
     <Style TargetType="phone:Panorama"> 
      <Setter Property="Foreground" Value="red"/> 
     </Style> 
    </Grid.Resources> 
    <phone:Panorama Title="my application"> 
    </phone:Panorama> 
</Grid> 

對圖像的代碼。如果你不知道如何創建風格,創造了當前元素和編輯的樣式的副本根據自己的喜好。我寫了一個blog post爲另一個SO用戶在這裏如何做到這一點:)

希望這有助於!

3

你想改變全景的標題模板:

<controls:panorama title="my application" titletemplate="{StaticResource SmallPanoramaTitle}"> 

這裏是模板:

<application.resources> 
      <datatemplate x:key="SmallPanoramaTitle"> 
       <contentpresenter> 
        <textblock text="{Binding}" fontsize="50" margin="0,70,0,0" /> 
       </contentpresenter> 
      </datatemplate> 
    </application.resources> 

這將讓你徹底改變你的題目是什麼樣子。

3
在VS2012

,VB.NET我需要使用適當的情況下設置:

<phone:Panorama Title="my application" TitleTemplate="{StaticResource SmallPanoramaTitle}"> 

和App.xaml文件

<Application.Resources> 
    <DataTemplate x:Key="SmallPanoramaTitle"> 
     <ContentPresenter> 
      <TextBlock Text="{Binding}" FontSize="50" Margin="0,70,0,0" /> 
     </ContentPresenter> 
    </DataTemplate> 
</Application.Resources> 
相關問題