RadioButton.Checked错误:Control.Checked不能出现在+ =或左手边 - = [英] RadioButton.Checked Error: Control.Checked cannot appear on the left hand side of += or -=
问题描述
我有奇怪的问题,我必须失去了一些东西。
I am having the strangest problem, and I have to be missing something.
下面是我的代码导致错误。
Here is my code that is causing the error.
if (radLot.Checked == true)
{
SymbolSpecification = "LotRenderer";
}
if (radWaterMeter.Checked == true)
{
SymbolSpecification = "WaterMeterRenderer";
}
正如你所看到的,我甚至不使用= +或 - = ......我居然没有在我的代码的任何地方...任何帮助,将不胜感激。
As you can see, I don't even use =+ or -=... I actually don't have it anywhere in my code... Any help would be appreciated.
推荐答案
<一个HREF =http://msdn.microsoft.com/en-us/library/system.windows.controls.primitives.togglebutton.checked相对=nofollow> 经过
是当一个切换按钮
被选中时引发事件的名称。 (在单选
类从切换按钮
派生的。)
Checked
is the name of the event that is raised when a ToggleButton
is checked. (The RadioButton
class derives from ToggleButton
.)
我假设你要访问的 器isChecked
属性,该属性获取(或设置)是否切换按钮
被选中。
I assume you want to access the IsChecked
property, which gets (or sets) whether the ToggleButton
is checked.
if (radLot.IsChecked == true)
{
SymbolSpecification = "LotRenderer";
}
提示:相关的可视状态开始与大多数布尔属性是 -
在WPF
这篇关于RadioButton.Checked错误:Control.Checked不能出现在+ =或左手边 - =的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!