Split design time support to a separate assembly #42

Closed
lextm opened this Issue Aug 12, 2012 · 8 comments

Comments

Projects
None yet
3 participants
@lextm
Member

lextm commented Aug 12, 2012

DockPanel Suite assembly contains a reference to System.Design, and some classes are especially for design time support.

This prevents users from using it in a project that targets client profile (.NET 3.5/4).

We can split such design time support to a separate assembly.

I did the same for Crad's ActionList,

lextm/ActionListWinForms#9

@roken

This comment has been minimized.

Show comment
Hide comment
@roken

roken Aug 12, 2012

Member

Is System.Design truly required in the first place? It appears the only usage is in the DockPanel for the Designer attribute, however we're not actually setting a custom designer.

Member

roken commented Aug 12, 2012

Is System.Design truly required in the first place? It appears the only usage is in the DockPanel for the Designer attribute, however we're not actually setting a custom designer.

@orzFly

This comment has been minimized.

Show comment
Hide comment
@orzFly

orzFly Aug 12, 2012

I never use the Designer due to its limitations.

orzFly commented Aug 12, 2012

I never use the Designer due to its limitations.

@lextm

This comment has been minimized.

Show comment
Hide comment
@lextm

lextm Aug 12, 2012

Member

Is there any side effect if we remove [Designer(typeof(System.Windows.Forms.Design.ControlDesigner))] from DockPanel definition?

If no side effect, we might remove System.Design completely.

Member

lextm commented Aug 12, 2012

Is there any side effect if we remove [Designer(typeof(System.Windows.Forms.Design.ControlDesigner))] from DockPanel definition?

If no side effect, we might remove System.Design completely.

@roken

This comment has been minimized.

Show comment
Hide comment
@roken

roken Aug 12, 2012

Member

I believe the purpose is to prevent controls from being parented by the dockpanel via the designer. For example, currently if you drop a control on top of a dockpanel it will not be added to the dockpanel's controls. The designer attribute is overriding the PanelDesigner set on the base class, which will allow you to drop a control onto the dockpanel itself (as you could with any panel).

So the purpose of the designer attribute here is desired, although I wonder if it can be accomplished another way.

Member

roken commented Aug 12, 2012

I believe the purpose is to prevent controls from being parented by the dockpanel via the designer. For example, currently if you drop a control on top of a dockpanel it will not be added to the dockpanel's controls. The designer attribute is overriding the PanelDesigner set on the base class, which will allow you to drop a control onto the dockpanel itself (as you could with any panel).

So the purpose of the designer attribute here is desired, although I wonder if it can be accomplished another way.

@lextm

This comment has been minimized.

Show comment
Hide comment
@lextm

lextm Aug 13, 2012

Member

If that's the usage of that attribute we can change it from using typeof to using a string.

Member

lextm commented Aug 13, 2012

If that's the usage of that attribute we can change it from using typeof to using a string.

@roken

This comment has been minimized.

Show comment
Hide comment
@roken

roken Aug 13, 2012

Member

Ah yes, good call. That should work perfectly!

Member

roken commented Aug 13, 2012

Ah yes, good call. That should work perfectly!

@lextm

This comment has been minimized.

Show comment
Hide comment
@lextm

lextm Aug 13, 2012

Member

According to this page, we should be able to replace [Designer(typeof(System.Windows.Forms.Design.ControlDesigner))] with [Designer("System.Windows.Forms.Design.ControlDesigner, System.Design"))] and then remove System.Design from reference list,

http://archive.msdn.microsoft.com/WinFormsCustomCtrl

Can you test it? @roken

Member

lextm commented Aug 13, 2012

According to this page, we should be able to replace [Designer(typeof(System.Windows.Forms.Design.ControlDesigner))] with [Designer("System.Windows.Forms.Design.ControlDesigner, System.Design"))] and then remove System.Design from reference list,

http://archive.msdn.microsoft.com/WinFormsCustomCtrl

Can you test it? @roken

@roken

This comment has been minimized.

Show comment
Hide comment
@roken

roken Aug 13, 2012

Member

Looks good, you can check that in.

Member

roken commented Aug 13, 2012

Looks good, you can check that in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment