Home > Net >  Questions about the xaml click the value is null
Questions about the xaml click the value is null

Time:11-06

Creation interface menu, click on the time bound data, and finally pass null values came in, said don't understand

As shown in figure

CodePudding user response:

You have a problem is the source of the binding to control the Id is null instead of coming on the null (or should be the entire object is null)

CodePudding user response:

What is the object. See lv selecteditem

CodePudding user response:

Lv. SelectedItem actual type of the object is MenuList but you want to use the as forced to transform it into a MenuModel lead to unsuccessful.
While transformation, as in is will return null if the conversion is not successful.
So m assigned to null
  •  Tags:  
  • C#
  • Related