private void Setup() { this.BackgroundColor = Color.FromHex(AppTheme.PrimaryColor()); // set custom style this.LabelTop.SetDynamicResource(StyleProperty, ApplicationResourcesConstants.StyleLabelFontFamily_Bold); this.LabelBottom.SetDynamicResource(StyleProperty, ApplicationResourcesConstants.StyleLabelFontFamily); Console.WriteLine(this.LabelTop.FontSize); AbsoluteLayout layout = new AbsoluteLayout(); this.StackContent.Children.Add(this.ImageLogo); this.StackContent.Children.Add(this.LabelTop); this.StackContent.Children.Add(this.LabelBottom); // center stack AbsoluteLayout.SetLayoutFlags(this.StackContent, AbsoluteLayoutFlags.PositionProportional); AbsoluteLayout.SetLayoutBounds(this.StackContent, new Rectangle(0.5, 0.5, 300, AbsoluteLayout.AutoSize)); layout.Children.Add(this.StackContent); Content = layout; }
public BaseNavigationPage(Page root) : base(root) { BarBackgroundColor = Color.FromHex(AppTheme.PrimaryColor()); BarTextColor = Color.FromHex(AppTheme.DefaultTextColor()); }
protected BaseContentPage() { BindingContext = ViewModel; this.BackgroundColor = Color.FromHex(AppTheme.PrimaryColor()); }