i'm a beginner in Xamarins.forms and i would like to know how i could create a menu with a list (not buttons) and bind each element of the list to a page i created. Is it possible?
One way would be to instantiate each page and hold them as objects you can easily reference. Then put them in a collection. Use the collection as the BindingContext of your ListView.
Or you could do the same with the VIewModels that back the pages.
Or you could create an enum of some kind... instantiating each page and ViewModel each time the user picks it.
There are many ways that could be done.
I don't know if anyone has an example laying around with Pages specifically. But an object is an object. You'd do it the same way with a collection of Pages or Dogs or Cars... What object you're wanting to use.
If the very idea of Binding is new to you in general, then stop. You can't learn by trying to also design from scratch at the same time. You can't learn architecing a house from trying to hammer boards together.
If binding is new to you then stop and work through the tutorials and walk-through Xamarin already has out. Consider Xamarin University. Or at the very least work Charles Petzold's Free book cover to cover before you try to make your first app from scratch.
thank you! but, actually, do you have a link that would show examples?
Examples of? Binding to a ListView? MVVM? C# in general?
yes just binding pages to a listview (in xaml) with c#
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies