Why I should use Xaml markup in Xamarin.Forms projects if I can do all job in C# file? I think about this a lot time. I did not find answer about that in Google search. I think with C# I can do my apps faster than with using Xaml. Maybe someone know something fundamental about that? I'm new in Xamarin.Forms.
答案 0 :(得分:2)
Why i should use Xaml markup in
It is easier to express visual coding patterns in Xaml
as templates than to attempt it in code. Once a template is defined, say within a list, the data it represents will be repeated for each data item based on that one template.
It appears easier for you to code it, because I surmise you are now learning about Xaml and getting it working is the more important.
The rule of thumb is that Xaml specified should define a bare framework and the data will fill in that framework. By doing it in Xaml it can be created and more importantly updated using the Xaml
design view (editor) to achieve the end goal.