我使用的复选框如下:
<CheckBox Content="Reload Code Table Rules"
IsChecked="{Binding ReloadCodeTableRules, UpdateSourceTrigger=PropertyChanged}"
VerticalAlignment="Center" />
目前,如果我点击复选框或标签,检查状态将会改变。是否可以将此限制为仅在选中复选框时更改?
答案 0 :(得分:2)
您可以将文字放在单独的TextBlock
中,然后将它们包装在StackPanel
中:
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<CheckBox IsChecked="{Binding ReloadCodeTableRules, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center"/>
<TextBlock Margin="4,0,0,0" Text="Reload Code Table Rules" VerticalAlignment="Center"/>
</StackPanel>