2015-01-10 2 views
0

내 을 내 페이지의 맨 아래에 배치하려고합니다. 그래서 이렇게 만들었습니다.플라이 아웃 배치 하단 Windows 전화

<Grid x:Name="ExampleRoot"> 

    <Grid HorizontalAlignment="Center" 
       VerticalAlignment="Top"> 
     <Image Source="{Binding Path=CurrentPage}" 
          Stretch="Uniform"        ContinuumNavigationTransitionInfo.IsEntranceElement="True" 
          /> 
    </Grid> 


    <FlyoutBase.AttachedFlyout> 

     <PickerFlyout Placement="Bottom" > <!-- Here I set my Placement ---> 
      <StackPanel> 
       <TextBlock Style="{ThemeResource TitleTextBlockStyle}" Text="{Binding Path=DocumentPageCounterDescription, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" /> 
       <TextBlock Style="{ThemeResource TitleTextBlockStyle}" Text="{Binding Path=SelectedAnnotation.Description, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" TextWrapping="Wrap" /> 
      </StackPanel> 
     </PickerFlyout> 
    </FlyoutBase.AttachedFlyout> 

</Grid> 

과를 열고이 같은 code behind

private void SomePropertyChanged(DependencyPropertyChangedEventArgs e) 
    { 
     ViewModel selected = e.NewValue as ViewModel; 
     FlyoutBase fly = FlyoutBase.GetAttachedFlyout(this.LayoutRoot); 
     fly.ShowAt(this.LayoutRoot); 
    } 

에서하지만 내 페이지의 상단에 모든 시간을 엽니 다. 예를 들어 FlyoutPlacementMode.Full으로 설정할 수 있으며 예상대로 작동합니다.

전체 페이지에서 첨부하여 시도했지만 결과는 같습니다. 그러면 내 페이지 맨 아래에서 어떻게 열 수 있습니까?

//// 편집

은 내가 following answer을 발견, 그러나 이것은 나를 위해 작동하지 않습니다! 나는 단추에서 그것을 열고 싶지 않아!

내가 원하는 방식으로 MenuFlyout에서 작동하지만, PickerFlyout을 갖고 싶습니다.

다른 게재 위치가 Flyout에서 작동하지 않는다고 설명되어 있습니다. 어떤 아이디어?

답변

0

괜찮 았어!

MenuFlyout은 나를위한 선택 사항이 아니므로 텍스트/정보를 표시하고 싶습니다. PickerFlyout은 수정할 수 없으므로 공통점이 있습니다.

위에서 언급 한 것처럼 MenuFlyout을 제외하고는 하단에 Flyout이있는 작업 배치가 없습니다. 내가 한 일은 여기에 있습니다.

 <FlyoutBase.AttachedFlyout> 
      <Flyout Placement="Full"> 

       <StackPanel Background="{ThemeResource FlyoutBackgroundThemeBrush}" > 
        <StackPanel Margin="5,0"> 
         <TextBlock Style="{ThemeResource TitleTextBlockStyle}" Text="Some Title Example" /> 
         <TextBlock Style="{ThemeResource TitleTextBlockStyle}" Text="Some Information Example" TextWrapping="Wrap" /> 
        </StackPanel> 
       </StackPanel> 

       <Flyout.FlyoutPresenterStyle> 
        <Style TargetType="FlyoutPresenter"> 
         <Setter Property="Background" Value="Transparent" /> 
         <Setter Property="VerticalContentAlignment" Value="Bottom" /> 
         <Setter Property="HorizontalContentAlignment" Value="Stretch" /> 
        </Style> 
       </Flyout.FlyoutPresenterStyle> 

      </Flyout> 
     </FlyoutBase.AttachedFlyout> 
    </Grid> 

FullPlacementMode 설정하고 보이지 않는 배경을 적용 하였다. 바깥 쪽 Stackpanel 만 배경을 표시합니다. 이렇게하면 진짜 PlacementMode.Bottom처럼 느껴집니다.

+0

당신의 방법은 아래에있는 플라이 아웃을 표시 할 수 있지만 아무 곳이나 클릭하면 단순히 내부 '를 클릭하고 있습니다 때문에 늘 정상적인 플라이 아웃 할 것처럼 기각 '사용자가 생각한 바깥 쪽의 플라이 아웃 –

1

Windows Phone RT 앱은 이미 설정 한 전체 또는 최상위 게재 위치의 플라이 아웃 만 지원합니다. 그러나 당신이 요구하는 것을 할 수 있습니다.

이 문서에 사용 될 수 있습니다 Flyout on Windows Phone 8.1 Runtime

관련 문제