我是 Metro 应用程序的新手。我想使用 ListView 控件显示图像和一些数据。为此,我搜索并发现我必须放置我的自定义数据资源。我有这个:
<DataTemplate x:Key="ImageTextListCollectionTemplate">
<StackPanel Orientation="Horizontal" Width="500" Height="130">
<Border Height="110" Width="110" Margin="10,10,0,10">
<Image Source="/SampleImage.png" Stretch="UniformToFill"/>
</Border>
<StackPanel Orientation="Vertical" VerticalAlignment="Top" Margin="0,10,0,0">
<TextBlock Text="Aellus nec ipsum tempor id laoreet viverra"
Margin="10,0,0,0" Width="350" Height="20" TextTrimming="WordEllipsis" />
<TextBlock Text="Phasellus faucibus"
Margin="10,2,0,0" Width="350" Height="14" TextTrimming="WordEllipsis"
HorizontalAlignment="Left" FontSize="9" Opacity="0.49"/>
<TextBlock Text="A Proin leo nulla, scelerisque non congue nec, facilisis a tellus. Sed varius rhoncus metus, et condimentum ipsum luctus ullamcorper."
Margin="10,2,0,0" Width="350" TextTrimming="WordEllipsis" TextWrapping="Wrap"/>
</StackPanel>
</StackPanel>
</DataTemplate>
现在到目前为止我可以理解,我必须解析它。我读过这个和这个,但无法理解。假设我对解析没有/很少,请提供一些有用的链接/解决方案,这使我能够理解利用它的科学。谢谢 :)