I am making a hybrid application in C # / Xamarin and I want to create my own menu for all applications (iOS, Android, Windows Phone).
So, I create MasterPage as my menu.
public MasterPage() { InitializeComponent(); var masterPageItems = new List<MenuItem>(); masterPageItems.Add(new MenuItem { Title = "Administraรงรฃo", }); masterPageItems.Add(new MenuItem { Title = "Meus Dados", IconSource = "contacts.png", TargetType = typeof(MeusDados), }); masterPageItems.Add(new MenuItem { Title = "Dados Cadastrais", IconSource = "contacts.png", TargetType = typeof(MeusNegocios), }); var listView = new ListView { ItemsSource = masterPageItems, ItemTemplate = new DataTemplate(() => { var imageCell = new ImageCell(); imageCell.SetBinding(TextCell.TextProperty, "Title"); imageCell.SetBinding(ImageCell.ImageSourceProperty, "IconSource"); return imageCell; }), VerticalOptions = LayoutOptions.FillAndExpand, SeparatorVisibility = SeparatorVisibility.None }; Padding = new Thickness(0, 20, 0, 0); Content = new StackLayout { VerticalOptions = LayoutOptions.Fill, Children = { listView } }; }
This is MenuItem :
public class MenuItem { public string Title { get; set; } public string IconSource { get; set; } public Type TargetType { get; set; } public string Parameter { get; set; } }
So now I want to change the page size of the content, font, font color, font size in C #. How should I do it?
source share