2
I’m having trouble creating a menu dynamically by loading directly from a list. In my project this is the following way
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="App1.Master"
Title="Master">
<ContentPage.Content>
<TableView x:Name="tbMenu">
</TableView>
</ContentPage.Content>
</ContentPage>
tbMenu.Root = new TableRoot
{
new TableSection("Menu")
{
new TextCell
{
Text = "DESTAQUE",
Command = navigateCommad,
CommandParameter = typeof(Default)
},
new TextCell
{
Text = "ESPORTES",
Command = navigateCommad,
CommandParameter = typeof(Default)
},
new TextCell
{
Text="ENTRETENIMENTO",
Command = navigateCommad,
CommandParameter = typeof(Default)
}
}
};
I would like to fill the tableview dynamically coming directly from a list Category tried with for and foreach more unsuccessfully someone could give me a help?