Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use x:Bind #34

Open
yeejmeem opened this issue Jun 29, 2016 · 1 comment
Open

Can't use x:Bind #34

yeejmeem opened this issue Jun 29, 2016 · 1 comment

Comments

@yeejmeem
Copy link

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.

@javitosanchez
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants