Пример #1
0
    public ToolbarButton(TabControlToolbar toolbar, string label, string tooltip, Stream bitmapStream, ICommand command = null) : base()
    {
        Toolbar = toolbar;
        Label   = label;
        Tooltip = tooltip;

        Initialize(bitmapStream, command);
    }
Пример #2
0
    private DispatcherTimer _dispatcherTimer;      // delays auto selection to throttle updates

    public ToolbarButton(TabControlToolbar toolbar, ToolButton toolButton) : base()
    {
        Toolbar  = toolbar;
        Label    = toolButton.Label;
        Tooltip  = toolButton.Tooltip;
        ShowTask = toolButton.ShowTask;

        CallAction      = toolButton.Action;
        CallActionAsync = toolButton.ActionAsync;

        Initialize(toolButton.Icon);

        if (toolButton.Default)
        {
            SetDefault();
        }
    }