コード例 #1
0
ファイル: Ribbon.cs プロジェクト: gybing/dms
        /// <summary>
        /// Creates a new Ribbon control
        /// </summary>
        public Ribbon()
        {
            SetStyle(ControlStyles.ResizeRedraw, true);
            SetStyle(ControlStyles.Selectable, false);
            DoubleBuffered = true;
            Dock           = DockStyle.Top;

            _tabs     = new RibbonTabCollection(this);
            _contexts = new RibbonContextCollection(this);

            // modify by cloudy
            //_tabsMargin = new Padding(12, 24 + 2, 20, 0);
            _tabsMargin        = new Padding(12, 2, 20, 0);
            _tabTextMargin     = new Padding(4, 2, 4, 2);
            _tabsPadding       = new Padding(8, 5, 8, 3);
            _tabContentMargin  = new Padding(1, 0, 1, 2);
            _panelPadding      = new Padding(3);
            _panelMargin       = new Padding(3, 2, 3, 15);
            _panelSpacing      = 3;
            _itemPadding       = new Padding(1, 0, 1, 0);
            _itemMargin        = new Padding(4, 2, 4, 2);
            _tabSpacing        = 6;
            _dropDownMargin    = new Padding(2);
            _renderer          = new RibbonProfessionalRenderer();
            _orbVisible        = true;
            _orbDropDown       = new RibbonOrbDropDown(this);
            _quickAcessToolbar = new RibbonQuickAccessToolbar(this);
            _quickAcessVisible = false;
        }
コード例 #2
0
 /// <summary>
 /// Creates a new collection
 /// </summary>
 /// <param name="ownerGroup"></param>
 internal RibbonQuickAccessToolbarItemCollection(RibbonQuickAccessToolbar toolbar)
 {
     _ownerToolbar = toolbar;
     SetOwner(toolbar.Owner);
 }