Hello,
I want to edit a special property of my custom WinForms component in the default property editor with a special handling.
So here, the detailed version :
In my problems I have two parts
- a Visual Studio Package
- a C# WinForms Solution with custom components
My scenario:
Visual Studio (2015) is running with the installed Package.
I've opened a solution with my custom component (WinForms)
I have a Form where an instance of my custom component is located.
When I open the form in the WinFroms Designer and select my component
I see all properties in the VS property inspector.
There is a string property "CustomSQL".
Regularly this would be shown a single lined input field.
When I decorate the property with attributes I can set the use of a special editor
[Description("custom SQL for SQL mode"), Category("ML Lookup Settings"), Browsable(true),
Editor(typeof(MultilineStringEditor), typeof(System.Drawing.Design.UITypeEditor))]
public string CustomSQL { get; set; }
I know that I can also write an own "SpecialSQLEditor" as CustomDesigner.Now to my problem:
This "SpecialSQLEditor" is typically coded in component source project.
I don't want to use an editor in my component project source.
I want to use an editor embedded in my Visual Studio package.
The reason this is, that in my Visual Studio Package I have all environment values
to access the database. So I can write an SQL Editor which is able to test the SQL
against the database. This is a special database, so I can not use any default VS editors.
Is it possible to hook in Visual Studio Property Editor and check if
component name is "MyComponent" and propertyname is "CustomSQL"?
In this case, an editor implemented in my VS package should be selected.
best regards Stephan Hartmann ML-Software GmbH