Click here to Skip to main content
15,905,148 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I've wrote some controls for Windows CE like a custom panel, group box, labels, progress bar etc..

I'm having problems to specify a custom Designer.

i've added a reference to System.Design and easily done on .net framework, but in .Net CF i dont know how do this with the same mode.

My question is: How do i need to do to support custom designers in .net cf?

In .Net Framework code looks like this:

VB
Imports System.ComponentModel
Imports System.ComponentModel.Design


but i dont know how to do it in .net cf.
Can anyone help me?

Thanks in advance

ps: sry for my english, i'm still learning.
Posted

1 solution

Well, i've found a solution after various articles and answers in foruns.

To add custom design editors to controls created on .NETCF basically we need a file XMTA (like a manifest file), specifying the comments and categories and editors, etc. Yupiii!!

See this link for more info, this article show how to add attributes into .net cf controls.
Design Time Attributes .Net CF

Design Time Attributes .Net CF


Microsoft XMTA File Example
XML
<property name="Line1DisplayMember">
<defaultvalue>
<type>System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</type>
<value>Name</value>
</defaultvalue>
<category>Data</category>
<description>The Property contain the data for line 1</description>
<editor>
<type>System.Windows.Forms.Design.DataMemberListEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</type>
<BaseType>System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</BaseType>
</editor>
</property>


Conclusion,
Create a XMTA(manifest) file and specify the values. When you compile the project, the .net compiler makes two libraries. The your library and other with .asmmeta.dll in the name ( it contains the manifest used by Visual Studio Designer to edit your control).

I hope it helps others people :)

Thanks Dan Elliott
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900