Example #1
0
        private SpButton CreateButton(IToolBarButton toolBarButton)
        {
            var button = new SpButton
            {
                Text = toolBarButton.Text,
                Size = btnLogout.Size
            };

            button.ApplyTheme(_theme);
            button.Click += async(s, e) => await ToolBarCustomButtonClick(toolBarButton.Action);

            return(button);
        }
Example #2
0
        private SpButton CreateSubMenuItem(ITree <MenuCategory> arg)
        {
            var button = new SpButton
            {
                Text = arg.Value.Name,
                Tag  = arg,
                Size = menuButtonSize,
                Font = new Font(Font.FontFamily, 10f)
            };

            button.ApplyTheme(Theme);

            button.Click += SubMenuCategoryClick;

            return(button);
        }
Example #3
0
        private SpButton CreateMenuButon(ITree <MenuCategory> arg)
        {
            var button = new SpButton
            {
                Text       = arg.Value.Name,
                Tag        = arg,
                Size       = new Size(100, flowTop.Height - 5),
                Selectable = true
            };

            button.ApplyTheme(Theme);

            button.Click += MainCategoryClick;

            return(button);
        }
Example #4
0
        private SpButton CreateProductButton(Product arg)
        {
            var button = new SpButton
            {
                Text = arg.Name,
                Tag  = arg,
                Size = menuButtonSize,
                Font = new Font(Font.FontFamily, 10f)
            };

            button.ApplyTheme(Theme);
            button.BackColor = MaterialColors.BlueGray();

            button.Click += ProductMenuClick;

            return(button);
        }