2012-05-28 2 views

답변

2

아마도 2 줄의 눈금 안에 파노라마를 배치 할 것입니다. 첫 번째 행에는 텍스트, 이미지 또는 정적으로 유지하려는 모든 것을 포함 할 수 있습니다. 그런 다음 파노라마 컨트롤을 두 번째 행 안에 배치합니다. 이 체크 아웃 :

<Grid x:Name="LayoutRoot"> 
    <Grid.RowDefinitions> 
     <RowDefinition Height="60"/> 
     <RowDefinition Height="*"/> 
    </Grid.RowDefinitions> 
    <Image x:Name="Logo" Grid.Row="0"/> 
    <controls:Panorama Grid.Row="1" Margin="0,-60,0,0"> 
     <controls:Panorama.Title><Rectangle Height="60"/></controls:Panorama.Title> 
    ... 
    </controls:Panorama> 
</Grid> 
+0

이 거의 작업이 좋겠처럼 보이지만, 파노라마의 배경은 아래에서 아래로 밀어하지 얻을 것이다 :

public class NoParalaxTitleLayer : PanningTitleLayer { protected override double PanRate { get { return 0d; } } } public class NoParalaxBackgroundLayer : PanningBackgroundLayer { protected override double PanRate { get { return 1d; } } } 

그리고 스타일을 :

그렇다면,이 시도 심벌 마크. 이 방법은 행 정의 없이도 작동하는 것처럼 보입니다. 그렇죠? –

+1

파노라마에 네비게이션 TOP MARGIN을 적용 할 수 있습니다. 내 대답을 업데이트 할게. – loyalpenguin

0

난 당신이 올바르게 파노라마에 대한 paralax 제목 층을 원하지 않는 이해합니다.

<Style x:Key="NonParalaxPanorama" TargetType="controls:Panorama"> 
      <Setter Property="Template"> 
       <Setter.Value> 
        <ControlTemplate TargetType="controls:Panorama"> 
         <Grid> 
          <Grid.RowDefinitions> 
           <RowDefinition Height="Auto"/> 
           <RowDefinition Height="*"/> 
          </Grid.RowDefinitions> 

          <local:NoParalaxBackgroundLayer x:Name="BackgroundLayer" 
       HorizontalAlignment="Left" Grid.RowSpan="2"> 
           <Border x:Name="background" 
        Background="{TemplateBinding Background}" 
        CacheMode="BitmapCache"/> 
          </local:NoParalaxBackgroundLayer> 
          <local:NoParalaxTitleLayer x:Name="TitleLayer" 
       CacheMode="BitmapCache" 
       ContentTemplate="{TemplateBinding TitleTemplate}" 
       Content="{TemplateBinding Title}" 
       FontSize="187" 
       FontFamily="{StaticResource PhoneFontFamilyLight}" 
       HorizontalAlignment="Left" 
       Margin="10,-76,0,9" Grid.Row="0"/> 
          <controlsPrimitives:PanningLayer x:Name="ItemsLayer" 
       HorizontalAlignment="Left" Grid.Row="1"> 
           <ItemsPresenter x:Name="items"/> 
          </controlsPrimitives:PanningLayer> 
         </Grid> 
        </ControlTemplate> 
       </Setter.Value> 
      </Setter> 
     </Style> 

<controls:Panorama Style="{StaticResource NonParalaxPanorama}"> 
</controls:Panorama>