waslibs
waslibs copied to clipboard
Can't use x:Bind
Why new version removed x:Bind in TextDetailLayout and YouTubeDetailLayout? Before, old version use x:Bind, i can get some info in code beind: Example: var messageDialog = new MessageDialog(ViewModel.SelectedItem.Content); await messageDialog.ShowAsync(); But now, with Binding, i can't use it in code behind, if use i will have error: if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break(); How to resolve? I'm beginner, and sorry for my bad english.
In your case it should affect to have bind or binding, the property is available anyway. The only thing it could happen is that the SelectedItem
is not set when you are trying to access to Content
property. We are setting the selected item in the Navigated Page event, so you need to be sure that is not null before trying to access its content.