构造函数执行到第47行就返回了,断点检测到的,程序没有爆出任何异常。
之前代码都一直是正常执行的,突然一次编译就这样了
而且突然所有的数据绑定和命令绑定都失效了。
有谁遇见过吗?
<Page xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="VRnew.View.ManagePatientView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:VRnew.View"
mc:Ignorable="d"
DataContext="{Binding managePatientViewModel, Source={StaticResource Locator}}"
x:Name="ManagePatientVMPage"
Title="ManagePatientView">
<telerik:RadButton x:Name="FlushButton" Grid.Row="4" Grid.Column="0"
Content="刷新" FontSize="25"
Command="{Binding DataContext.FlushPatient ,ElementName=ManagePatientVMPage}"
telerik:StyleManager.Theme="Office2016Touch"
></telerik:RadButton>
这是View层的
private RelayCommand _flushpatient;
public RelayCommand FlushPatient =>
_flushpatient ?? (_flushpatient = new RelayCommand
(async () =>
{
PatientInformationIE = managePatientModel.GetAllPatient();
})
);
这是VM层的,点击flush按钮没有触发command,断点不执行这里。