0
私はUWPアプリケーションを作成し、RelativePanelを使用します。 リストビューの幅を広げるために相対panel.alignwithright、top、left、bottomパネルを使用します。 しかし、他の要素(例:Stackpanel)をリストビューの右側に追加した後、他のパネルはページに表示されません。 したがって、relativePanel.AlignWithRightを削除します。この場合、リストビューで幅を伸ばすことはできません。UWP Xaml相対パネル、伸縮その他の要素
私は何ができますか?
コード:
<RelativePanel x:Name="Information" Grid.Row="1">
<ListView x:Name="MyList"
RelativePanel.AlignBottomWithPanel="True"
RelativePanel.AlignTopWithPanel="True"
RelativePanel.AlignRightWithPanel="True"
RelativePanel.AlignLeftWithPanel="True">
<ListView.ItemTemplate>
<DataTemplate>
<userControl:SpendListItem_Template Tapped="SpendListItem_Template_Tapped" ></userControl:SpendListItem_Template>
</DataTemplate>
</ListView.ItemTemplate>
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
<Setter Property="Margin" Value="10,0,10,10"></Setter>
</Style>
</ListView.ItemContainerStyle>
</ListView>
<StackPanel x:Name="TotalInformation" RelativePanel.RightOf="MyList" Width="100">
<TextBlock>Test Data</TextBlock>
</StackPanel>
</RelativePanel>
感謝:これは、1つのライナーです。それはとてもうまくいく。 –