Example #1
0
        protected OverlayHeader()
        {
            RelativeSizeAxes = Axes.X;
            AutoSizeAxes     = Axes.Y;

            Children = new Drawable[]
            {
                new Container
                {
                    RelativeSizeAxes = Axes.X,
                    Height           = cover_height,
                    Masking          = true,
                    Child            = CreateBackground()
                },
                new Container
                {
                    Margin = new MarginPadding {
                        Left = UserProfileOverlay.CONTENT_X_MARGIN
                    },
                    Y                = cover_height,
                    Height           = cover_info_height,
                    RelativeSizeAxes = Axes.X,
                    Anchor           = Anchor.TopLeft,
                    Origin           = Anchor.BottomLeft,
                    Depth            = -float.MaxValue,
                    Children         = new Drawable[]
                    {
                        CreateTitle().With(t => t.X = -ScreenTitle.ICON_WIDTH),
                        TabControl = new OverlayHeaderTabControl
                        {
                            Anchor           = Anchor.BottomLeft,
                            Origin           = Anchor.BottomLeft,
                            RelativeSizeAxes = Axes.X,
                            Height           = cover_info_height - 30,
                            Margin           = new MarginPadding {
                                Left = -UserProfileOverlay.CONTENT_X_MARGIN
                            },
                            Padding = new MarginPadding {
                                Left = UserProfileOverlay.CONTENT_X_MARGIN
                            }
                        }
                    }
                },
                new Container
                {
                    Margin = new MarginPadding {
                        Top = cover_height
                    },
                    RelativeSizeAxes = Axes.X,
                    AutoSizeAxes     = Axes.Y,
                    Child            = CreateContent()
                }
            };
        }
Example #2
0
 protected override TabControl <string> CreateTabControl() => TabControl = new OverlayHeaderTabControl();