我有一个Silverlight页面,在codebehind布尔属性。
I have a silverlight page with a boolean property in the codebehind.
在XAML我有一个TabControl的和内部的TabItem的内容之一是BusyIndicator控件。
In the xaml I have a tabcontrol and inside one of the tabitem's content is a busyindicator.
我想将BusyIndicator控件的isbusy属性绑定到在codebehind布尔属性,但我不解决这个问题,无论我用什么约束力的声明。
I want to bind the busyindicator's isbusy property to the boolean property in the codebehind, but I can't resolve it no matter what binding statement I use.
在codebehind,你需要确保你已经设置的DataContext。因此,在你页面的Load事件,把这个:
In the codebehind, you need to make sure you have set the DataContext. So in the Load event of your page, put this:
this.DataContext = this;
如果你已经做到了这一点,那么你将需要发布更多的细节。
If you have already done this then you will need to post more details.
上一篇:java.io.FileNotFoundException:即使访问被拒绝,虽然我在AndroidManifest推权限我在、被拒、权限、io
下一篇:在文本和图像一个ListView使用MatrixCursor和SimpleCursorAdapter图像、文本和、ListView、SimpleCursorAdapter