我是开发新手,我正在尝试使用 C# 代码创建 LongListSelector 但没有成功。谁能帮我创建这个。
我的 XML 代码是 -
<phone:LongListSelector ItemRealized="LLS_ItemRealized" Name="longList" ItemsSource="{Binding supportedList}" IsGroupingEnabled="False" LayoutMode="List" HideEmptyGroups="True" Margin="30,0,26,0" >
<phone:LongListSelector.ItemTemplate>
<DataTemplate>
<Grid Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="210"/>
<ColumnDefinition Width="210"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="120"/>
</Grid.RowDefinitions>
<Image Height="118" Width="209" Tap="ThumbnailImageTap" Margin="0" Stretch="Fill" Source="{Binding ThumbnailUrl1}" Tag="{Binding ClipId1}" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<Image Height="118" Width="209" Tap="ThumbnailImageTap" Margin="0" Stretch="Fill" Source="{Binding ThumbnailUrl2}" Tag="{Binding ClipId2}" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Right"/>
</Grid>
</DataTemplate>
</phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>
任何用 C# 创建它的建议都很好,或者任何与我的答案相关的链接。
谢谢 :)