我认为这是一个简单的问题,但我在网上找不到任何信息.我正在将ListBox绑定到像这样的List使用BindingSource:
List<Customer> customers = MyMethodReturningList();
BindingSource customersBindingSource = new BindingSource();
customersBindingSource.DataSource = customers;
customersListBox.DataSource = customersBindingSource;
Run Code Online (Sandbox Code Playgroud)
现在,当我从添加或删除customers列表中,我ListBox被更新(即使没有使用ResetBindings上BindingSource),但如果我更改任何客户对象的列表,它没有.通话ResetBindings无效.我甚至实现了自己的BindingList,但行为没有改变.
的Customer类使用属性用于访问和数据的修改.其ToString()内容显示在列表中.
我在.Net 2.0中使用C#.
有任何想法吗?
谢谢
我一直在阅读使用GLKit和您自己的自定义着色器非常容易.但是,到目前为止,我没有找到任何关于如何实际操作的信息.如何将自己的着色器"插入"现有的GLKit项目中?
我需要一个添加GLSurfaceView到FrameLayout一个PopupWindow.问题是,在内部,SurfaceView从当前窗口请求令牌.PopupWindows没有他们自己的令牌,所以我从弹出父母那里给它一个令牌,如下所示:
class MySurfaceView extends GLSurfaceView {
...
@Override
public IBinder getWindowToken() {
// I set the mPopupParent manually to be the parent of the PopupWindow in question
return mPopupParent.getWindowToken();
}
}
...
}
Run Code Online (Sandbox Code Playgroud)
现在,即使MySurfaceView添加到了FrameLayout内容中PopupWindow,它也不会在那里绘制.它借鉴了我从中得到令牌的观点.
如何在实际添加的布局上绘制它?
编辑:只是为了给出更多细节,如果它有所不同,mPopupParent是一个IME视图(基本上是一个键盘).