Xamarin.forms Xamarin Forms Shell弹出型按钮项路由(带参数)导致NullReference异常
我正在使用shell中的弹出项进行导航:Xamarin.forms Xamarin Forms Shell弹出型按钮项路由(带参数)导致NullReference异常,xamarin.forms,Xamarin.forms,我正在使用shell中的弹出项进行导航: <FlyoutItem Title="LogOff"> <ShellContent Route="LogoffTimePage" ContentTemplate="{DataTemplate local:LogoffTimePage}" /> </FlyoutItem> My viewmodel使用以下属性装饰: [QueryProperty(nam
<FlyoutItem Title="LogOff">
<ShellContent Route="LogoffTimePage" ContentTemplate="{DataTemplate local:LogoffTimePage}" />
</FlyoutItem>
My viewmodel使用以下属性装饰:
[QueryProperty(nameof(Id),nameof(Id))]
public class LogoffTimePageViewModel : BaseViewModel
为什么使用空ref ex?不能在路由注册中添加参数
public bool Id { get; set; }
[QueryProperty(nameof(Id),nameof(Id))]
public class LogoffTimePageViewModel : BaseViewModel