我在WPF应用程序中有一个带有4个单选按钮(2组)的向导中的页面.我正在使用.Net4和Caliburn Micro.
单击并设置值时,它已正确绑定到相应的属性.当我离开页面并返回时,我需要在代码中设置属性,并期望通过NotifyPropertyChanged在页面上更新它们.但是不检查RadioButtons,即使相应的属性设置了......
有谁知道如何使用caliburn.micro?!
这是xaml:
<RadioButton Name="NewInstallChecked" GroupName="InstallType" Content="New Installation (default)" Margin="75,10,0,0" />
<RadioButton Name="UpdateInstallChecked" GroupName="InstallType" Content="Update of existing Installation" Margin="75,10,0,0" />
<Label Content="Please select which version of Siseco you want to install:" Height="28" HorizontalAlignment="Left" Margin="20,20,0,0" Name="label2" VerticalAlignment="Top" />
<RadioButton Name="ServerChecked" GroupName="Version" Content="Server version (default)" Margin="75,10,0,0" />
<RadioButton Name="ClientChecked" GroupName="Version" Content="Client version" Margin="75,10,0,0" />
Run Code Online (Sandbox Code Playgroud)
这里是我视图模型中的代码:
public bool ClientChecked
{
get { return _clientChecked; }
set { _clientChecked = value; NotifyOfPropertyChange(() => ClientChecked); }
}
public bool ServerChecked
{
get { …Run Code Online (Sandbox Code Playgroud)