If you class exposes only simple typed properties then you should be able to
use the ExpandableObjectConverter. This xml worked with a previous build of
Visual Studio, I've not had chance to carry on this work with Beta 2, but
this shows the xml used for the ProcessStartInfo class which is used by the
Process class in the SDF:-
<Class Name="OpenNETCF.Diagnostics.ProcessStartInfo">
<DesktopCompatible>false</DesktopCompatible>
<DesignTimeVisible>true</DesignTimeVisible>
<TypeConverter>System.ComponentModel.ExpandableObjectConverter, System,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089</TypeConverter>
<Property Name="Arguments">
<Browsable>true</Browsable>
<DesignerSerializationVisibility>Content</DesignerSerializationVisibility>
<NotifyParentProperty>true</NotifyParentProperty>
</Property>
<Property Name="FileName">
<Browsable>true</Browsable>
<DesignerSerializationVisibility>Content</DesignerSerializationVisibility>
<NotifyParentProperty>true</NotifyParentProperty>
</Property>
<Property Name="UseShellExecute">
<Browsable>true</Browsable>
<DefaultValue>
<Type>System.Boolean</Type>
<Value>True</Value>
</DefaultValue>
<DesignerSerializationVisibility>Content</DesignerSerializationVisibility>
<NotifyParentProperty>true</NotifyParentProperty>
</Property>
<Property Name="Verb">
<Browsable>true</Browsable>
<DefaultValue>
<Type>System.String</Type>
<Value></Value>
</DefaultValue>
<DesignerSerializationVisibility>Content</DesignerSerializationVisibility>
<NotifyParentProperty>true</NotifyParentProperty>
</Property>
<Property Name="WindowStyle">
<Browsable>false</Browsable>
<DefaultValue>
<Type>System.Int32</Type>
<Value>0</Value>
</DefaultValue>
<DesignerSerializationVisibility>Hidden</DesignerSerializationVisibility>
</Property>
</Class>
Peter
--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com |
http://www.peterfoot.net |
http://www.opennetcf.org
"Keith Welch" <keith@nospam_mooseworkssoftware.com> wrote in message
news:ub$(E-Mail Removed)...
> Sorry, that didn't work. The 2005 structure is quite different than 2003.
> There are no longer designer control versions, and editors/ type
> converters attributes are called out in an xml file, and are implemented
> in a separate windows forms dll. The type converter I have will work in
> 2003 and 2005 desktop, but not here. The property should serialize
> something like:
> UserControl1.TestClass = new TestClass("test", 42.0);
> I hope the problem description is clear. Thanks,
> Keith Welch
>
> "David McNamee"
> <(E-Mail Removed)> wrote in
> message news:(E-Mail Removed)...
>> "Keith Welch" <keith@NoSpam_mooseworkssoftware.com> wrote in message
>> news:%(E-Mail Removed)...
>>>I am having trouble with type converters in 2005 while creating custom
>>>controls. While the control can serialize simple properties at design
>>>time, I cannot get it to serialize class type properties.
>>
>> I'm not sure yet how the custom control infrastructure has changed in
>> Visual Studio 2005, but in prior versions classes needed a parameterless
>> default constructor in order for automatic serialization to happen. Try
>> adding an empty new() method to your TestClass code and see what happens.
>>
>>
>> --
>> David McNamee
>> Mobility Architect
>> developerLabs, Inc
>> http://www.developerLabs.NET/
>>
>
>