0
我正在开发一个现代的C#/ XAML Win8应用程序。我有一个本质上是一个大的列表视图的页面,头是一个图像。这可以很好地工作,并提供我期待的用户体验。如何更改列表视图标题上的对齐方式
一个问题,我想将图像和其他列表视图置于页面中心。
我设法中心ListView的项目是这样的:
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Center" />
</Style>
</ListView.ItemContainerStyle>
我一直无法弄清楚如何风格的标题。以下是显示标题的代码:
<!-- The header of the listview is the image -->
<ListView.HeaderTemplate>
<DataTemplate>
<Viewbox MaxHeight="480" Width="660">
<Image
x:Name="image"
Source="{Binding ImageBig}"/>
</Viewbox>
</DataTemplate>
</ListView.HeaderTemplate>
有谁知道我该如何实现这一目标?
非常感谢您的帮助!