2017-01-29 9 views
0

私のUWP Appは、モバイルデバイスの向きが左右に回転すると白い隙間を表示します。 enter image description here方向の白いギャップ!=ポートレートのフラット

私のXAML:

<prismMvvm:SessionStateAwarePage> 
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> 
    <Grid.RowDefinitions> 
     <RowDefinition /> 
     <RowDefinition /> 
    </Grid.RowDefinitions> 
    <ListBox Grid.Row="0" x:Name="VideoItemsListBox"> 
     <ListBox.ItemsPanel> 
      <ItemsPanelTemplate> 
       <VirtualizingStackPanel Orientation="Horizontal"/> 
      </ItemsPanelTemplate> 
     </ListBox.ItemsPanel> 
     <ListBox.ItemTemplate> 
      <DataTemplate> 
       <TextBlock Text="{Binding title}" /> 
      </DataTemplate> 
     </ListBox.ItemTemplate> 
    </ListBox> 
    <MediaElement x:Name="VideoPlayer" Grid.Row="1"> 
    </MediaElement> 
</Grid> 

私はギャップを取り除くために何かを実装する必要がありますか?これをどうすれば解決できますか?

+0

リストボックスに表示されていますか?データテンプレートが定義されていません –

+0

xamlコードを編集しました。 – Briefkasten

+0

リストボックスの背景色を変更すると、白いパッチの色が変わりますか? –

答えて

1

ステータスバーのストライプのようです。 Hide the status barは次のように問題を解決する可能性があります。

public RemoveGap() 
{ 
    this.InitializeComponent(); 
    if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar")) 
    { 
     StatusBar.GetForCurrentView().HideAsync(); 
    } 
} 

ご注意を、このクラスを使用するには、我々は以下の画像のような移動の特別な参照を追加する必要がありますを示しています。enter image description here

関連する問題