Questions tagged «listviewitem»

6
Android ListView每行具有不同的布局
我试图确定最好的方法来拥有一个单独的ListView,其中每行包含不同的布局。我知道如何创建自定义行+自定义数组适配器以支持整个列表视图的自定义行,但是如何在ListView中实现许多不同的行样式?

1
ListViewItem不会延伸到ListView的宽度
我目前正在设计使用XAML的Windows 8应用商店应用程序,但是我有一个较小的大小问题。我有一个带有DataTemple的ListView。 我的ListView和DataTemplate的代码如下: <ListView x:Name="listPageItems" Grid.Row="1" SelectionMode="Extended" IsSwipeEnabled="False" ItemsSource="{Binding Mode=OneWay, Source={StaticResource items}}" ItemTemplate="{StaticResource NavigationItemTemplate}" ScrollViewer.VerticalScrollBarVisibility="Visible"> </ListView> <DataTemplate x:Key="NavigationItemTemplate"> <Grid Height="75"> <Grid.RowDefinitions> <RowDefinition Height="1.6*" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Rectangle Fill="White" /> <Rectangle Fill="{StaticResource SSEGreenBrush}" Grid.Row="1" /> <Border BorderThickness="2" BorderBrush="{StaticResource SSEGreenBrush}" Grid.RowSpan="2" /> <TextBlock x:Name="textTitle" Text="{Binding ClientName}" Style="{StaticResource TitleTextStyle}" Foreground="{StaticResource SSEBlueBrush}" …

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.