Source/Design/RibbonBarMergeContainerDesigner.cs

(开头部分) 2KB

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

using System;
using System.Text;
using System.Windows.Forms.Design;
using System.ComponentModel;
using System.Collections;
using System.ComponentModel.Design;

namespace DevComponents.DotNetBar.Design
{
    /// <summary>
    /// Represents the Windows Forms Designer for RibbonBarMergeContainer control.
    /// </summary>
    public class RibbonBarMergeContainerDesigner : ParentControlDesigner
    {
#if FRAMEWORK20
        public override void InitializeNewComponent(IDictionary defaultValues)
        {
            base.InitializeNewComponent(defaultValues);
            SetDesignTimeDefaults();
        }
#else
		public override void OnSetComponentDefaults()
		{
            SetDesignTimeDefaults();
			base.OnSetComponentDefaults();
		}
#endif

        private void SetDesignTimeDefaults()
        {
            RibbonBarMergeContainer c = this.Control as RibbonBarMergeContainer;
            if (c != null)
            {
                TypeDescriptor.GetProperties(c)["Visible"].SetValue(c, false);
                TypeDescriptor.GetProperties(c)["ColorSchemeStyle"].SetValue(c, eDotNetBarStyle.Office2007);
            }
        }

        public override DesignerVerbCollection Verbs
        {
            get
            {
                DesignerVerbCollection verbs = new DesignerVerbCollection(new DesignerVerb[]
				    {
					    new DesignerVerb("Layout Ribbons", new EventHandler(LayoutRibbons))
                    });
                //verbs.AddRange(base.Verbs);

                return verbs;
            }
        }

        private void LayoutRibbons(object sender, EventArgs e)
        {
            RibbonPanel panel = this.Control as RibbonPanel;
            if (panel == null)
                return;

            IDesignerHost host = this.GetService(typeof(IDesignerHost)) as IDesignerHost;
            DesignerTransaction trans = null;
后面还有 15 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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