Example #1
0
        protected override void CreateRibbonCommand(IRibbonCommands cmds)
        {
            cmds.AddButtonCommand(ButtonMore).Action(() => MessageBox.Show(@"More..."));

            cmds.AddToggleButtonCommand(ToggleButtonId)
                .Action(isPressed =>
                {
                    MessageBox.Show(isPressed 
                        ? @"Toggle button pressed" 
                        : @"Toggle button NOT pressed");
                }).Pressed(() => true);

            cmds.AddDropDownCommand(BookmarksDropDownId)
                .ItemCounts(content.Count)
                .ItemsId(content.Ids)
                .ItemsLabel(content.Labels)
                .ItemsImage(() => content.Images())
                .ItemsSupertip(content.SuperTips)
                .Action(index =>
                { 
                    MessageBox.Show(@"Your selection:" + (index+1));
                });

            cmds.AddComboBoxCommand(BookmarksComboId)
                .ItemCounts(content.Count)
                .ItemsId(content.Ids)
                .ItemsLabel(content.Labels)
                .ItemsSupertip(content.SuperTips)
                .GetText(() => "Text")
                .OnChange((value) => MessageBox.Show(@"Your selection:" + value));
        }
Example #2
0
        protected void CreateRibbonCommand(IRibbonCommands cmds)
        {
            cmds.AddButtonCommand(ButtonMore).OnAction(() => MessageBox.Show(@"More..."));

            cmds.AddToggleButtonCommand(ToggleButtonId).OnPressed(isPressed => {
                MessageBox.Show(isPressed
                    ? @"Toggle button pressed"
                    : @"Toggle button NOT pressed");
            });

            cmds.AddDropDownCommand(BookmarksDropDownId)
            .GetItemCount(_content.Count)
            .GetItemId(i => _content.Ids(i))
            .GetItemLabel(i => _content.Labels(i))
            .GetItemImage(i => _content.Images(i))
            .GetItemSupertip(_content.SuperTips)
            .OnItemAction(index => { MessageBox.Show(@"Your selection:" + (index + 1)); });

            cmds.AddComboBoxCommand(BookmarksComboId)
            .GetItemCount(_content.Count)
            .GetItemId(i => _content.Ids(i))
            .GetItemLabel(i => _content.Labels(i))
            .GetItemSupertip(_content.SuperTips)
            .GetText(() => "Text")
            .OnChange((value) => MessageBox.Show(@"Your selection:" + value));
        }
Example #3
0
        protected override void CreateRibbonCommand(IRibbonCommands cmds)
        {
            cmds.AddButtonCommand(ButtonMore).Action(() => MessageBox.Show(@"More..."));

            cmds.AddToggleButtonCommand(ToggleButtonId)
            .Action(isPressed =>
            {
                MessageBox.Show(isPressed
                        ? @"Toggle button pressed"
                        : @"Toggle button NOT pressed");
            }).Pressed(() => true);

            cmds.AddDropDownCommand(BookmarksDropDownId)
            .ItemCounts(content.Count)
            .ItemsId(content.Ids)
            .ItemsLabel(content.Labels)
            .ItemsImage(() => content.Images())
            .ItemsSupertip(content.SuperTips)
            .Action(index =>
            {
                MessageBox.Show(@"Your selection:" + (index + 1));
            });

            cmds.AddComboBoxCommand(BookmarksComboId)
            .ItemCounts(content.Count)
            .ItemsId(content.Ids)
            .ItemsLabel(content.Labels)
            .ItemsSupertip(content.SuperTips)
            .GetText(() => "Text")
            .OnChange((value) => MessageBox.Show(@"Your selection:" + value));
        }