canton7 / Stylet

A very lightweight but powerful ViewModel-First MVVM framework for WPF for .NET Framework and .NET Core, inspired by Caliburn.Micro.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About CanExecute Err!

wf-soft opened this issue · comments

Hi! @canton7
How to handle "bool Canxxx = > View.xxx" This exception is initialized to null.

image

If I use datagroupv?. DG SelectedItems.Count ==1; popup's MenuItem will be disabled forever and cannot be refreshed

As the message says, DataGroupV is null, so calling DataGroupV.dg gives you a NullReferenceException.

If I use datagroupv?. DG SelectedItems.Count ==1; popup's MenuItem will be disabled forever and cannot be refreshed

You'll have to debug why that is.

I'm afraid this isn't a question specifically about Stylet: you'll get much better support somewhere else, like StackOverflow.