コード例 #1
0
        private void InitializeToolbar()
        {
            CommandBarButtonEntry commandBarButtonEntryImageBrightness = new CommandBarButtonEntry(components);

            commandBarButtonEntryImageBrightness.CommandIdentifier = commandImageBrightness.Identifier;

            CommandBarButtonEntry commandBarButtonEntryImageRotate = new CommandBarButtonEntry(components);

            commandBarButtonEntryImageRotate.CommandIdentifier = commandImageRotate.Identifier;

            CommandBarButtonEntry commandBarButtonEntryImageReset = new CommandBarButtonEntry(components);

            commandBarButtonEntryImageReset.CommandIdentifier = commandImageReset.Identifier;

            CommandBarButtonEntry commandBarButtonEntryImageSaveDefaults = new CommandBarButtonEntry(components);

            commandBarButtonEntryImageSaveDefaults.CommandIdentifier = commandImageSaveDefaults.Identifier;

            CommandBarDefinition commandBarDefinition = new CommandBarDefinition(components);

            commandBarDefinition.LeftCommandBarEntries.Add(commandBarButtonEntryImageRotate);
            commandBarDefinition.LeftCommandBarEntries.Add(commandBarButtonEntryImageBrightness);

            commandBarDefinition.RightCommandBarEntries.Add(commandBarButtonEntryImageReset);
            commandBarDefinition.RightCommandBarEntries.Add(commandBarButtonEntryImageSaveDefaults);

            commandBarLightweightControl = new PrimaryWorkspaceWorkspaceCommandBarLightweightControl(components);
            commandBarLightweightControl.LightweightControlContainerControl = this;

            commandBarLightweightControl.CommandManager       = ApplicationManager.CommandManager;
            commandBarLightweightControl.CommandBarDefinition = commandBarDefinition;
        }
コード例 #2
0
        private void InitializeToolbar()
        {
            commandBarButtonEntryAddMenu = new CommandBarButtonEntry(components);
            commandBarButtonEntryAddMenu.CommandIdentifier = commandAddMenu.Identifier;

            commandBarButtonEntryRemoveMenu = new CommandBarButtonEntry(components);
            commandBarButtonEntryRemoveMenu.CommandIdentifier = commandImageRemove.Identifier;

            commandBarLabel      = new CommandBarLabelEntry(components);
            commandBarLabel.Text = Res.Get(StringId.ImgSBEffectsLabel);

            commandBarDefinition = new CommandBarDefinition(components);
            commandBarDefinition.RightCommandBarEntries.Add(commandBarButtonEntryAddMenu);
            commandBarDefinition.RightCommandBarEntries.Add(commandBarButtonEntryRemoveMenu);

            commandBarDefinition.LeftCommandBarEntries.Add(commandBarLabel);

            commandBarLightweightControl = new ImageDecoratorsCommandBarLightweightControl(components);
            commandBarLightweightControl.LightweightControlContainerControl = this;

            commandAddMenu.CommandBarButtonContextMenuDefinition = addCommandContextMenuDefinition;

            commandBarLightweightControl.CommandManager       = _decoratorsManager.CommandManager;
            commandBarLightweightControl.CommandBarDefinition = commandBarDefinition;

            InitFocusAndAccessibility();
        }
コード例 #3
0
 public BlogProviderButtonCommandBarControl()
     : base(new BlogProviderButtonCommandBarLightweightControl(), CommandBarDefinition.Create(_providerCommandIds.ToArray()))
 {
 }