我有这个问题,我的复选框IsChecked属性绑定不起作用.我用谷歌搜索,但人们说它shoudl TwoWay绑定,这是我正在使用.
这是我的代码:
<CheckBox Name="ckC" VerticalAlignment="Center" IsChecked="{Binding Path=LSMChannelEnable[2],Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
这是它背后的C#代码:
public bool[] LSMChannelEnable { get { return this._liveImage.LSMChannelEnable; } set { this._liveImage.LSMChannelEnable = value; OnPropertyChanged("LSMChannelEnable"); OnPropertyChanged("EnableChannelCount"); OnPropertyChanged("LSMChannel"); } }
任何指针都非常感谢,