|
|
|
date: Sun, 6 Jan 2008 04:51:04 -0800,
group: microsoft.public.vstudio.extensibility
back
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
|
|