简体   繁体   English

选择单选按钮时如何取消选中复选框

[英]How to uncheck a CheckBox when a RadioButton is selected

I am dealing with a WiX installer. 我正在处理WiX安装程序。

I have this CheckBox control: 我有这个CheckBox控件:

<Control Type="CheckBox" Id="OfficePluginsEnabledCheckbox" Width="107" Height="17" X="11" Y="114" Text="Enable Installed Add-ins" Property="OFFICEPLUGINSENABLED" CheckBoxValue="1"/>

I have this RadioButtonGroup control: 我有这个RadioButtonGroup控件:

<Control Type="RadioButtonGroup" Property="INSTALLADDINKEYS" Id="AddinKeysRadioButtonGroup" Width="74" Height="45" X="218" Y="131">
    <RadioButtonGroup Property="INSTALLADDINKEYS">
      <RadioButton Text="All Users" Height="17" Value="AllUsers" Width="200" X="0" Y="0" />
      <RadioButton Text="Current User" Height="17" Value="CurrentUser" Width="200" X="0" Y="15" />
      <RadioButton Text="None" Height="17" Value="None" Width="200" X="0" Y="30" />
    </RadioButtonGroup>
    <Publish Property="OFFICEPLUGINSENABLED"><![CDATA[INSTALLADDINKEYS="None"]]></Publish>
</Control>

I am trying to de-select OfficePluginsEnabledCheckbox when None is ticked in the RadioButtonGroup . RadioButtonGroup中的None被勾选时,我试图取消选择OfficePluginsEnabledCheckbox As shown above, I've tried publishing the OFFICEPLUGINSENABLED property. 如上所示,我尝试发布OFFICEPLUGINSENABLED属性。 However this does not work as OFFICEPLUGINSENABLED is never actually published when None is ticked. 但是,这不起作用,因为OFFICEPLUGINSENABLED中“ None ”时,实际上从未发布过OFFICEPLUGINSENABLED Why is this, and how can I achieve my desired functionality? 为什么会这样,如何实现所需的功能?

You are missing a value attribute in your script above. 您在上面的脚本中缺少value属性。 Try the following: 请尝试以下操作:

<Publish Property="OFFICEPLUGINSENABLED" Value="0"><![CDATA[INSTALLADDINKEYS="None"]]></Publish>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 取消选中复选框后如何删除消息框中的记录? - How to delete record in message box when I uncheck checkbox? datagridview复选框列作为单个选定行的单选按钮 - datagridview checkbox column as radiobutton for single selected row 如何知道所选单选按钮的索引 - How to know the index of radiobutton selected 如何在数据网格中获取选定的单选按钮并通过单击行选择单选按钮 - How to get selected radiobutton in datagrid and select radiobutton by clicking the row 如何取消RadioButton或CheckBox检查更改 - How to cancel RadioButton or CheckBox checked change 在C#中将AutoCheck属性设置为false时,手动检查和取消选中RadioButton的正确方法是什么? - What is the proper way to manually check and uncheck a RadioButton when the AutoCheck property is set to false in C#? 复选框和单选按钮控件适配器 - CheckBox and RadioButton Control Adapter 如果选择了一个列表项,则取消选中复选框列表 - uncheck checkboxlist if one listitem selected 如何在WPF datagridcheckboxcolumn中选中/取消选中复选框? 以及如何在后面的代码中检索isChecked值? - How to check/uncheck checkbox in WPF datagridcheckboxcolumn? And how to later retrieve the isChecked value in the code behind? 如何根据表中的现有数据记录选中或取消选中 Datagridview 中的复选框 - How to Check or Uncheck a Checkbox in Datagridview based on existing data record from Table
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM