Пример #1
0
            //private void SetPropertiesForTrueDBGrid(IComponent component, System.Collections.IDictionary properties)
            //{
            //}

            private void SetPropertiesForFlexGrid(IComponent component, System.Collections.IDictionary properties)
            {
                properties.Remove("Columns");
                if (designerActionService != null && columnEditing != null && !columnEditingRemoved)
                {
                    designerActionService.Remove(component, columnEditing);
                    columnEditingRemoved = true;
                }
            }
Пример #2
0
        public override void Initialize(System.ComponentModel.IComponent component)
        {
            base.Initialize(component);
            DesignerActionService service = this.GetService(typeof(DesignerActionService)) as DesignerActionService;

            if (service != null)
            {
                service.Remove(component);
            }
        }
Пример #3
0
        public override void Initialize(System.ComponentModel.IComponent component)
        {
            base.Initialize(component);
            //base.Glyphs.Add(new WizardPageDesignerGlyph(this));
            DesignerActionService service = GetService(typeof(DesignerActionService)) as DesignerActionService;

            if (service != null)
            {
                service.Remove(component);
            }
        }
Пример #4
0
        /*private static string[] propsToRemove = new string[] { "Anchor", "AutoScrollOffset", "AutoSize", "BackColor",
         *      "BackgroundImage", "BackgroundImageLayout", "ContextMenuStrip", "Cursor", "Dock", "Enabled", "Font",
         *      "ForeColor", "Location", "Margin", "MaximumSize", "MinimumSize", "Padding", "Size", "TabStop", "UseWaitCursor",
         *      "Visible" };
         *
         * protected override void PreFilterProperties(System.Collections.IDictionary properties)
         * {
         *      base.PreFilterProperties(properties);
         *      foreach (string p in propsToRemove)
         *              if (properties.Contains(p))
         *                      properties.Remove(p);
         * }*/

        public override void Initialize(System.ComponentModel.IComponent component)
        {
            base.Initialize(component);

            if (this.Control is HidableDetailPanel)
            {
                this.EnableDesignMode(((HidableDetailPanel)this.Control).DetailArea, "DetailArea");
            }

            DesignerActionService service = this.GetService(typeof(DesignerActionService)) as DesignerActionService;

            if (service != null)
            {
                service.Remove(component);
            }
        }
 /// <summary>
 /// Removes the duplicate DockingActionList added by this designer to the <see cref="DesignerActionService"/>.
 /// </summary>
 /// <remarks>
 /// <see cref="ControlDesigner.Initialize"/> adds an internal DockingActionList : 'Dock/Undock in Parent Container'.
 /// But the default designer has already added that action list. So we need to remove one.
 /// </remarks>
 private void RemoveDuplicateDockingActionList() {
     // This is a true hack -- in a class that is basically a huge hack itself.
     // Reach into the bowel of our base class, get a private field, and use that fields value to
     // remove an action from the designer.
     // In ControlDesigner, there is "private DockingActionList dockingAction;"
     // Don't you just love Reflector?!
     FieldInfo fi = typeof(ControlDesigner).GetField("dockingAction", BindingFlags.Instance | BindingFlags.NonPublic);
     if (fi != null) {
         DesignerActionList dockingAction = (DesignerActionList)fi.GetValue(this);
         if (dockingAction != null) {
             DesignerActionService service = (DesignerActionService)GetService(typeof(DesignerActionService));
             if (service != null) {
                 service.Remove(this.Control, dockingAction);
             }
         }
     }
 }