Hi
I am using custom wizard, in that i want to show value editor that pops up me the folders in my project,i am trying to use default Microsoft.Practices.RecipeFramework.Library.Editors, will it work for me to populate. I have seen the custom wizard page2 example with the default GAT Package, but i dontunderstand it, how do i show the value editor inmy custom wizard because i dont see in my tool box the value editor control.
How do i acheive this
Waiting for your reply
thanks
satish | | satish padidem Wednesday, January 09, 2008 9:59 AM | Let's take a look at the MessageEditor used by GAT: The recipe is using the "built-in" wizard page and defining the editor for the Developer field:
<Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0"> <Pages> <Page> <Title>Collect information using editors, converters and value providers.</Title> <Fields> <Field ValueName="Developer" Label="Your name"> <Tooltip>Custom editor provided by the guidance package, the MessageEditor, also used in the "Say a message" recipe.</Tooltip> <Editor Type="GuidancePackage2.Editors.MessageEditor, GuidancePackage2" /> </Field>
The Editor is the bridge to show the form which allows you to edit the value. You can take a look at the Editor source code and realize how it's using the MessageEditorForm:
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { object svc = provider.GetService(typeof(IWindowsFormsEditorService)); if (svc == null) { return base.EditValue(context, provider, value); }
MessageEditorForm form = new MessageEditorForm();
If you are creating a custom wizard page, you should check which form is using the editor you need and create it directly in your code behind when you need to launch the editing of the value.
HTH, -Adrian
| | Adrian Alonso Wednesday, January 09, 2008 12:55 PM | Let's take a look at the MessageEditor used by GAT: The recipe is using the "built-in" wizard page and defining the editor for the Developer field:
<Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0"> <Pages> <Page> <Title>Collect information using editors, converters and value providers.</Title> <Fields> <Field ValueName="Developer" Label="Your name"> <Tooltip>Custom editor provided by the guidance package, the MessageEditor, also used in the "Say a message" recipe.</Tooltip> <Editor Type="GuidancePackage2.Editors.MessageEditor, GuidancePackage2" /> </Field>
The Editor is the bridge to show the form which allows you to edit the value. You can take a look at the Editor source code and realize how it's using the MessageEditorForm:
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { object svc = provider.GetService(typeof(IWindowsFormsEditorService)); if (svc == null) { return base.EditValue(context, provider, value); }
MessageEditorForm form = new MessageEditorForm();
If you are creating a custom wizard page, you should check which form is using the editor you need and create it directly in your code behind when you need to launch the editing of the value.
HTH, -Adrian
| | Adrian Alonso Wednesday, January 09, 2008 12:55 PM |
Ok, inmy case where i want to show all the folders in my solution, i am trying to use the default one as provided by library, in that case how do i know which form to use.
any help
satish | | satish padidem Wednesday, January 09, 2008 2:02 PM | You should find out which Form is using the library for the editor you need. This could be not public.
| | Adrian Alonso Wednesday, January 09, 2008 2:05 PM |
|