Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
tools
vsnet.act
vsnet.debugging
vsnet.documentation
vsnet.enterprise.tools
vsnet.general
vsnet.ide
vsnet.jlca
vsnet.servicepacks
vsnet.setup
vsnet.vsip
vsnet.vss
vsnet.vstools.office
vstudio.development
vstudio.extensibility
vstudio.general
vstudio.helpauthoring
vstudio.setup
vstudio.sourcesafe
  
 
date: Sun, 6 Jan 2008 04:51:04 -0800,    group: microsoft.public.vstudio.extensibility        back       


Dragging components TO the toolbox   
I noticed that you can configure a component on your design surface by 
setting the properties to whatever you want, and then drag the component to 
the toolbox.  The Toolbox will create a toolbox item called "Template1" and 
you can share that pre-configured component across forms and projects.  But 
this only seems to work for components in the component tray and not controls 
or forms.

Can anyone help me understand why this only seems to work with components 
and not controls?  Is there also a programmatic way to create the toolbox 
item that has these pre-configured components?  And how are they saved in the 
.tbd file?

Thanks for any help.
Joe
date: Sun, 6 Jan 2008 04:51:04 -0800   author:   Joe Burke am

RE: Dragging components TO the toolbox   
Hi Joe,

This is a quick note to let you know that I am performing research on this 
issue and will get back to you as soon as possible. I appreciate your 
patience. 



Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
date: Mon, 07 Jan 2008 07:38:28 GMT   author:   (Walter Wang [MSFT])

RE: Dragging components TO the toolbox   
Thanks Walter.  I forgot to mention that I'm using VS2005.  I'd also like to 
know if VS2008 has the same behavior or is it different.

Joe

""Walter Wang [MSFT]"" wrote:

> Hi Joe,
> 
> This is a quick note to let you know that I am performing research on this 
> issue and will get back to you as soon as possible. I appreciate your 
> patience. 
> 
> 
> 
> Regards,
> Walter Wang (wawang@online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
> 
> ==================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================
> 
> This posting is provided "AS IS" with no warranties, and confers no rights. 
> 
>
date: Mon, 7 Jan 2008 05:57:00 -0800   author:   Joe Burke am

RE: Dragging components TO the toolbox   
Hi Joe,

I've consulted your question with product group. 

The behavior you observed is correct, which is also the same in VS2008. 
It's just that the controls currently don't support being customized like 
the components. 

The components do not provide native support for user interaction via a 
form, such as exposing a UI that's hosted by a form or handing keyboard and 
mouse input. On the other hand intrinsic support for UI interaction is 
provided by controls. This distinction is further reinformed by the 
location where components are hosted on a form, specifically in an area as 
the nonvisual design surface, or component tray.

This is not directly explaining why the controls don't support customizing 
like the components but I think it's related to how they are implemented. 
Actually control authors can usually provide a customized ToolboxItem such 
as:

[ToolboxItem(typeof(MyToolboxItem))]
Class MyControl: Control { }

Class MyToolboxItem : ToolboxItem { 
  Override CreateComponentsCore(¡­) {
    //set any additional property values here.
  }
}


Or you can programmatically add a toolbox item using 
ToolboxService.AddToolboxItem. Most Visual Studio features do this during 
ResetDefaults on their VSPackage -- which indicates that the items are 
default items. You can also do this from an Addin, as long as you can get 
IToolboxService.

Please let me know if you want more information about this.

Regarding the .tbd, it's merely a cache of the toolbox contents, for the 
customized template of a component, it's simply a serialization of the 
component in question.

Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
date: Tue, 08 Jan 2008 07:42:11 GMT   author:   (Walter Wang [MSFT])

RE: Dragging components TO the toolbox   
Thanks Walter, that's what I wanted to know.

Later,
Joe


""Walter Wang [MSFT]"" wrote:

> Hi Joe,
> 
> I've consulted your question with product group. 
> 
> The behavior you observed is correct, which is also the same in VS2008. 
> It's just that the controls currently don't support being customized like 
> the components. 
> 
> The components do not provide native support for user interaction via a 
> form, such as exposing a UI that's hosted by a form or handing keyboard and 
> mouse input. On the other hand intrinsic support for UI interaction is 
> provided by controls. This distinction is further reinformed by the 
> location where components are hosted on a form, specifically in an area as 
> the nonvisual design surface, or component tray.
> 
> This is not directly explaining why the controls don't support customizing 
> like the components but I think it's related to how they are implemented. 
> Actually control authors can usually provide a customized ToolboxItem such 
> as:
> 
> [ToolboxItem(typeof(MyToolboxItem))]
> Class MyControl: Control { }
> 
> Class MyToolboxItem : ToolboxItem { 
>   Override CreateComponentsCore(¡­) {
>     //set any additional property values here.
>   }
> }
> 
> 
> Or you can programmatically add a toolbox item using 
> ToolboxService.AddToolboxItem. Most Visual Studio features do this during 
> ResetDefaults on their VSPackage -- which indicates that the items are 
> default items. You can also do this from an Addin, as long as you can get 
> IToolboxService.
> 
> Please let me know if you want more information about this.
> 
> Regarding the .tbd, it's merely a cache of the toolbox contents, for the 
> customized template of a component, it's simply a serialization of the 
> component in question.
> 
> Regards,
> Walter Wang (wawang@online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
> 
> ==================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================
> 
> This posting is provided "AS IS" with no warranties, and confers no rights. 
> 
>
date: Tue, 8 Jan 2008 10:43:01 -0800   author:   Joe Burke am

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us