Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个 GridView 应用程序,我想将 GridView 中的图像绑定到我从 Web 服务获取的值,我将图像作为字符串(二进制)接收
我使用 C# 编程语言和 Sql Server 数据库
您需要从 Web 服务中获取一个列表,将其转换为基于源列表指定 UriSource 的 BitmapImage 对象列表,并将该列表绑定到 GridView.ItemsSource。然后将 GridView.ItemTemplate/DataTemplate 设置为将其 Source 绑定到集合中的 BitmapImage 的 Image。
您可能希望您的 Web 服务与 SQL Server 对话——我想您可以使用 ADO.NET、Entity Framework 或其他类似的东西。