This repository was archived by the owner on Dec 18, 2023. It is now read-only.
Added x:DataType
to views to use compiled bindings
#136
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
x:DataType
for all the views <3Hi @jamesmontemagno , I dont know if you remember me from this stream, but I wanted to contribute to your app.
In these changes I have added
x:DataType
to all of your views. This is so the project uses the compiled bindings.It also gives you compile time errors when you have a binding that does not match the binding context. This should be helpful for future development.
Notes
DataTemplate
also has to specify whichx:DataType
it is using, and this normally has to be set on theDataTemplate
element.PodcastEpisodePage
because I did not understand where theIsBusy
property belongs. It is not in thePodcastEpisodeViewModel
, which is the binding context of the page.Off topic
I also want to highlight this issue in the
Xamarin/Forms
github repository. It would be very interesting if thex:DataType
could be further developed so we can get propper intellisense in the IDE when we are working with it. That would truly be amazing!