WPF绑定复选框

WPF绑定复选框

问题描述:

HI,

我完全是WPF的初学者.我正在尝试使用复选框绑定进行一些操作.但是,正如我在下面解释的那样,我被卡在这里了.请有人帮我解决这个问题.

I'm completely a beginner in WPF.I'm trying out few things with checkbox binding .however i got stuck here as i explained below.Someone please help me out on this.

我创建了一个Genericcontrol,在xaml.cs文件[labels,checkboxes]中添加了所需的控件[自定义代码].从ViewModel加载了标签上下文和checkboxes [显示名称]上下文,还设置了复选框绑定属性[ 相应的视图模型],然后将复选框与该事件中的已选中事件相关联.

I have created a Genericcontrol, where the required controls[custom code] are added in xaml.cs file [labels , checkboxes].loaded the  label context and checkboxes[display names] context from a ViewModel, also set the checkbox binding properties[to the corresponding view model] and tied the checkbox to a checked event in that .

现在,每当我选中复选框时,都会选择我已加载的所有复选框.

Now whenever i am checking the checkbox , all the checkboxes i have loaded are getting selected.

我不知道该如何处理.请帮帮我.谢谢.

I dont know how to handle this .Please help me out .Thank you .

可以给我们看一下xaml和xaml吗? CS代码
Can you please show us the xaml and xaml.cs code