Source/Ribbon/RibbonPanel.cs

(开头部分) 29KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using System.Collections;

namespace DevComponents.DotNetBar
{
	/// <summary>
	/// Represents panel used by RibbonTabItem as a container panel for the control.
	/// </summary>
	[ToolboxItem(false), Designer(typeof(DevComponents.DotNetBar.Design.RibbonPanelDesigner))]
    public class RibbonPanel : PanelControl, IKeyTipsControl
	{
		#region Private Variables
		private const string INFO_TEXT="Drop RibbonBar or other controls here. Drag and Drop tabs and items to re-order.";
		private RibbonTabItem m_RibbonTabItem=null;
		private bool m_UseCustomStyle=false;
        private bool m_DefaultLayout = false;
        private bool m_StretchLastRibbonBar = false;
        private ElementStyle m_DefaultStyle = new ElementStyle();
        private RightToLeft m_RightToLeft = RightToLeft.No;
        private bool m_InternalLayoutSuspend = false;
        private ButtonX m_ButtonScrollRight = null;
        private ButtonX m_ButtonScrollLeft = null;
        private Rectangle m_ViewBounds = Rectangle.Empty;
        private int m_ScrollOffset = 0;
		#endregion

		#region Internal Implementation
		/// <summary>
		/// Creates new instance of the panel.
		/// </summary>
		public RibbonPanel():base()
		{
			this.BackColor=SystemColors.Control;
		}

        protected override ElementStyle GetStyle()
        {
            if (!this.Style.Custom)
            {
                return GetDefaultStyle();
            }
            return base.GetStyle();
        }

        private bool m_PopupMode = false;
        private RibbonControl m_RibbonControl = null;
        internal RibbonControl GetRibbonControl()
        {
            if (m_PopupMode)
                return m_RibbonControl;
            return this.Parent as RibbonControl;
        }

        internal bool IsPopupMode
        {
            get { return m_PopupMode; }
        }
后面还有 725 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。