2017-06-30 8 views
0

視覚的な状態を単純化するために、私が書いているUWPアプリケーションでRelativePanelを使用したいと思っています。xaml RelativePanelを使用して2列レイアウトを作成するにはどうすればよいですか?

これは私が

enter image description here

何をしたい私は、次のXAMLでこれを達成しようとしましたされています

<RelativePanel> 

    <TextBlock x:Name="Title" Height="50" Margin="15" FontSize="24" 
     RelativePanel.AlignTopWithPanel="True" 
     RelativePanel.AlignLeftWithPanel="True" 
     RelativePanel.AlignRightWithPanel="True"> 
    </TextBlock> 

    <TextBox x:Name="Editor" Margin="15" Padding="20" HorizontalAlignment="Stretch" 
     RelativePanel.AlignLeftWithPanel="True" 
     RelativePanel.Below="Title" 
     RelativePanel.RightOf="FileList"> 
    </TextBox> 

    <ListView x:Name="FileList" HorizontalAlignment="Stretch" Margin="15" 
     RelativePanel.AlignRightWithPanel="True" 
     RelativePanel.Below="Title"> 
    </ListView> 

</RelativePanel> 

これは動作しません。 Editorは伸びません。 EditorRelativePanel.AlignRightWith="FilesList"に設定すると、過去のファイルリストが伸びて、ウィンドウがいっぱいになります。

RelativePanelで私がしたいことをする方法はありますか?私は

答えて

1

あなたEditor制御を持っている必要があり、この場合にRelativePanelを使いたい - -

RelativePanel.AlignLeftWithPanel="True" 
RelativePanel.Below="Title" 
RelativePanel.LeftOf="FileList" 
RelativePanel.AlignBottomWithPanel="True" 

はそれがLeftOfする必要がありますGridでこれを行う方法の提案を投稿しないでください、私はそれをすでに行うことができます、RightOfではありません。 AlignBottomWithPanelTrueに設定する必要があります。

関連する問題