Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Custom property editor from external assembly
 

Custom property editor from external assembly

Hi all,

I have two assemblies:
- first contains class Foo:
class Foo : Control
{
[Editor("MyExternalLibraryNamespace.MyIntEditor, MyExternalAssembly", typeof(UITypeEditor))]
public int MyProp
{
get{....} set{.....}
}
}

- second contains editor class MyIntEditor in MyExternalLibraryNamespace namespace which is bound to Foo.MyProp property.

I copy both external assembly (MyExternalAssembly.dll) and assembly with Foo class (derived from Control) to private app folder, add new form and drop Foo control on the form.
My goal is to show my custom editor in VS` designer but it does`nt.
Then I drop PropertyGrid component on the form, bind it to my Foo control and run app. Property grid shown my custom editor in runtime.

So my question is: what I need to do to show my editor, that`s in external assembly, in VS designer`s property grid ?
ARMSoft  Thursday, May 15, 2008 5:25 PM
Solved. You should add reference to your designer assembly to the project.
ARMSoft  Saturday, May 17, 2008 10:02 AM
Solved. You should add reference to your designer assembly to the project.
ARMSoft  Saturday, May 17, 2008 10:02 AM
And how do you do that with a compact framework control?

Since VS refuses to add reference to a desktop project to a pocketpc project, and the System.Drawing.Design namespace is "not included" in .NET CF.

So is it impossible to have a custom editor for a compact framework control's property?

Sly
Sly1024  Thursday, May 22, 2008 8:22 PM
Sorry, I`m not familiar with CF at all.
If things are like you said I see only one way to go - to include both design- and run-time logic in one assembly.
ARMSoft  Sunday, May 25, 2008 6:57 AM

You can use google to search for other answers

Custom Search

More Threads

• XP Style Controls
• How to show the progress in percentage over a progress bar
• Problems with My First Whidbey Beta 2 Form
• Control grouping frames
• How to make the linklabel back color as forms backcolor.
• ProgressBar inside listview
• How do I change home windows?
• flicking effect
• ListView SelectedIndexChanged fired more than once
• Draw on tab page