繁体   English   中英

WinView 8.1中未出现ListView DataTemplate中的Xamarin.Forms图像

[英]Xamarin.Forms Image in ListView DataTemplate not appearing in WinPhone 8.1

将图像XAML组件放在Windows Phone 8.1的Xamarin.Forms的listview数据模板中时,将无法使用。 图像在Android和iOS上看起来不错。

  <ListView x:Name="recipeList" ItemsSource="{Binding Tweets}" HasUnevenRows="true">
  <ListView.ItemTemplate>
    <DataTemplate>
      <ViewCell> 
       <ViewCell.View>                  
        <StackLayout>
          <Image Source="{Binding ImageURI"} />
        </StackLayout>
       </ViewCell.View>
      </ViewCell>
     </DataTemplate>
   </ListView.ItemTemplate>

其中ImageURI =“ http://some-image-off-the-web.jpg

更新在UWP中,该文本甚至都不会出现! 忘记图像,实际的文本是不可见的。 我可以看到每个列表项都是使用Visual Studio Live Property Explorer填充的,每个列表项中肯定有文本要显示,只是不可见。 我删除了标签的网格,它工作正常。 图片仍未显示。 ViewCells在Windows中不能正常工作吗?

在StackLayout中查看图像源。

    <StackLayout>
      <Image Source="{Binding ImageURI"} />
    </StackLayout>

引号未对齐。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM