Пример #1
0
        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;
        }
Пример #2
0
 public BaseNavigationPage(Page root) : base(root)
 {
     BarBackgroundColor = Color.FromHex(AppTheme.PrimaryColor());
     BarTextColor       = Color.FromHex(AppTheme.DefaultTextColor());
 }
Пример #3
0
 protected BaseContentPage()
 {
     BindingContext       = ViewModel;
     this.BackgroundColor = Color.FromHex(AppTheme.PrimaryColor());
 }