【发布时间】:2019-11-19 02:14:33
【问题描述】:
我试图在屏幕最右侧的列表视图中放置一个按钮,但没有成功。
到目前为止,我有这个,
<DataTemplate x:DataType="local:SSS">
<RelativePanel HorizontalAlignment="Stretch">
<TextBlock
x:Name="A"
Text="{x:Bind xxx}"
FontWeight="Bold"
RelativePanel.AlignLeftWithPanel="True"
RelativePanel.AlignTopWithPanel="True"
RelativePanel.AlignBottomWithPanel="True"/>
<TextBlock
x:Name="B"
Text="{x:Bind xxx}"
TextAlignment="Right"
RelativePanel.RightOf="A"
RelativePanel.AlignRightWithPanel="True"
RelativePanel.AlignTopWithPanel="True"
RelativePanel.AlignBottomWithPanel="True"/>
</RelativePanel>
</DataTemplate>
如何将第二个文本块推到屏幕的最右侧?
|A B|
【问题讨论】:
-
问题可能是列表视图。你需要告诉它使用全宽。 stackoverflow.com/questions/39438106/…
-
@MarkW 成功了!如果您可以将其作为答案,我将接受。感谢您的帮助。