Compact Framework 3.5上的Designer [英] Designer on Compact Framework 3.5

查看:90
本文介绍了Compact Framework 3.5上的Designer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为Windows CE编写了一些控件,如自定义面板,组合框,标签,进度条等。



我遇到了问题指定自定义Designer。



我已经添加了对System.Design的引用并且很容易在.net框架上完成,但在.Net CF我不知道如何使用相同的模式。



我的问题是:我如何在.net cf中支持自定义设计师?



.Net Framework代码如下所示:



 进口系统.ComponentModel 
Imports System.ComponentModel.Design





但是我不知道怎么做.net cf.

任何人都可以帮助我吗?



提前致谢



ps:sry for my english,我还在学习。

解决方案

好吧,我找到了解决方案在foruns中的各种文章和答案之后。



要将自定义设计编辑器添加到在.NETCF上创建的控件基本上我们需要一个文件XMTA(如清单文件),指定Yupiii !!



有关详细信息,请参阅此链接,本文介绍如何将属性添加到.net cf contro中ls。

设计时属性.Net CF



设计时间属性.Net CF





Microsoft XMTA文件示例

 <   property     name   =  Line1DisplayMember >  
< defaultvalue >
< type > 系统。 String,mscorlib,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a < / type >
< value > 名称< / value >
< / defaultvalue >
< 类别 > 数据< / category >
< description > 该属性包含以下数据:第1行< / descripti on >
< 编辑 >
< type > System.Windows.Forms.Design.DataMemberListEditor,System.Design,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a < / type >
< BaseType > 系统.Drawing.Design.UITypeEditor,System.Drawing,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a < / BaseType >
< / editor >
< / property >





结论,

创建XMTA(清单)文件并指定值。编译项目时,.net编译器会生成两个库。您的库和其他名称中包含.asmmeta.dll(它包含Visual Studio Designer用来编辑控件的清单)。



我希望它可以帮助其他人人物:)



感谢 Dan Elliott


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:

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.

解决方案

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

<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


这篇关于Compact Framework 3.5上的Designer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆