本文介绍了如何将observablecollection绑定到图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,专家们,在我的应用程序中,我有一个ado.net数据实体模型类,通过它我从数据库中提取数据,我的窗口类代码如下:

Hi experts, In my application i have a ado.net data entity model class which with it i pull data from my database,my window class code is as below:

ms = new MSEntities();
         var Res = from St in ms.Staffs
                   select St;

       ObservableCollection<Staff> staffs = new ObservableCollection<Staff>(Res); // staff is my database table

        staffName.ItemsSource = staffs; // my combo box source
        staffName.DisplayMemberPath = "StaffName";
        myimage.Source = ???


在这里我想将staffphoto绑定到我的图像源,但是我不知道该怎么做,有人可以帮我吗?谢谢.


here I want to bind staffphoto to my image source but i dont know how to do that,could someone help me with this please??thank you.

推荐答案


这篇关于如何将observablecollection绑定到图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 02:38
查看更多