我需要将我的listviewitems水平放置,但我找不到方法,所以到目前为止我尝试了:
<ListView Grid.Row="0" ItemsSource="{Binding Path=Cells, UpdateSourceTrigger=PropertyChanged}"
ItemTemplate="{StaticResource CellGroupTemplate}"
Background="{StaticResource EnvLayout}"
HorizontalContentAlignment="Stretch">
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListViewItem}">
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black"/>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent"/>
</Style.Resources>
</Style>
</ListView.ItemContainerStyle>
</ListView>
我的项目是附加了视图模型的其他UI控件
<DataTemplate DataType="{x:Type vm:CellItemViewModel}" x:Key="CellGroupTemplate">
<vw:CellItemView/>
</DataTemplate>
有人能告诉我如何将每个元素(数据模板)放在另一个元素旁边吗
非常感谢。