Exemplo n.º 1
0
        private void CreateLinkButton(BackstageViewPage page)
        {
            var lnkButton = new BackstageViewButton
            {
                Text                = page.LinkText,
                Tag                 = page,
                Top                 = _pages.IndexOf(page) * ButtonSpacing,
                Width               = this.pnlMenu.Width,
                Height              = ButtonHeight,
                ContentPageColor    = this.BackColor,
                PencilBorderColor   = _buttonsAreaPencilColor,
                SelectedTextColor   = _selectedTextColor,
                UnSelectedTextColor = _unSelectedTextColor,
                HighlightColor1     = _highlightColor1,
                HighlightColor2     = _highlightColor2
            };

            pnlMenu.Controls.Add(lnkButton);
            lnkButton.Click += this.ButtonClick;
        }
Exemplo n.º 2
0
        private void CreateLinkButton(BackstageViewPage page, bool haschild = false, bool child = false)
        {
            string label = page.LinkText;

            if (haschild)
            {
                label = ">> " + label;
            }
            if (child)
            {
                label = "      " + label;
            }

            var lnkButton = new BackstageViewButton
            {
                Text = label,
                Tag  = page,
                Top  = ButtonTopPos,
                // Top = _items.TakeWhile(i => i != page).Sum(i => i.Spacing),
                Width               = this.pnlMenu.Width,
                Height              = ButtonHeight,
                ContentPageColor    = this.BackColor,
                PencilBorderColor   = _buttonsAreaPencilColor,
                SelectedTextColor   = _selectedTextColor,
                UnSelectedTextColor = _unSelectedTextColor,
                HighlightColor1     = _highlightColor1,
                HighlightColor2     = _highlightColor2,
                //Dock = DockStyle.Bottom
            };

            pnlMenu.Controls.Add(lnkButton);
            lnkButton.Click       += this.ButtonClick;
            lnkButton.DoubleClick += lnkButton_DoubleClick;

            ButtonTopPos += lnkButton.Height;
        }
Exemplo n.º 3
0
        private void CreateLinkButton(BackstageViewPage page,bool haschild = false, bool child = false)
        {
            string label = page.LinkText;

            if (haschild)
            {
                label = ">> " + label;
            }
            if (child)
            {
                label = "      " + label;
            }

            var lnkButton = new BackstageViewButton
                                {
                                    Text = label,
                                    Tag = page,
                                    Top = ButtonTopPos,
                       // Top = _items.TakeWhile(i => i != page).Sum(i => i.Spacing),
                                    Width = this.pnlMenu.Width,
                                    Height = ButtonHeight,
                                    ContentPageColor = this.BackColor,
                                    PencilBorderColor = _buttonsAreaPencilColor,
                                    SelectedTextColor = _selectedTextColor,
                                    UnSelectedTextColor = _unSelectedTextColor,
                                    HighlightColor1 = _highlightColor1,
                                    HighlightColor2 = _highlightColor2,
                                    //Dock = DockStyle.Bottom
                                };

            pnlMenu.Controls.Add(lnkButton);
            lnkButton.Click += this.ButtonClick;
            lnkButton.DoubleClick += lnkButton_DoubleClick;

            ButtonTopPos += lnkButton.Height;
        }
        private void CreateLinkButton(BackstageViewPage page)
        {
            var lnkButton = new BackstageViewButton
                                {
                                    Text = page.LinkText,
                                    Tag = page,
                        Top = _items.TakeWhile(i => i != page).Sum(i => i.Spacing),
                                    Width = this.pnlMenu.Width,
                                    Height = ButtonHeight,
                                    ContentPageColor = this.BackColor,
                                    PencilBorderColor = _buttonsAreaPencilColor,
                                    SelectedTextColor = _selectedTextColor,
                                    UnSelectedTextColor = _unSelectedTextColor,
                                    HighlightColor1 = _highlightColor1,
                                    HighlightColor2 = _highlightColor2,
                                   // Dock = DockStyle.Bottom
                                };

            pnlMenu.Controls.Add(lnkButton);
            lnkButton.Click += this.ButtonClick;
            lnkButton.DoubleClick += lnkButton_DoubleClick;
        }
        private void CreateLinkButton(BackstageViewPage page)
        {
            var lnkButton = new BackstageViewButton
                                {
                                    Text = page.LinkText,
                                    Tag = page,
                                    Top = _pages.IndexOf(page) * ButtonSpacing,
                                    Width = this.pnlMenu.Width,
                                    Height = ButtonHeight,
                                    ContentPageColor = this.BackColor,
                                    PencilBorderColor = _buttonsAreaPencilColor,
                                    SelectedTextColor = _selectedTextColor,
                                    UnSelectedTextColor = _unSelectedTextColor,
                                    HighlightColor1 = _highlightColor1,
                                    HighlightColor2 = _highlightColor2
                                };

            pnlMenu.Controls.Add(lnkButton);
            lnkButton.Click += this.ButtonClick;
            lnkButton.DoubleClick += lnkButton_DoubleClick;
        }