在紧凑型框架3.5中的用户控件(例如多行文本)中定义自定义设计时间编辑器 [英] Define custom design time editor in a usercontrol (e.g. multiline text) in compact framework 3.5
本文介绍了在紧凑型框架3.5中的用户控件(例如多行文本)中定义自定义设计时间编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在.NET中,我只会写
In .NET I would just write
[Editor(typeof(System.ComponentModel.Design.MultilineStringEditor), typeof(System.Drawing.Design.UITypeEditor))]
public string MultiLineText { get; set; }
获取字符串属性的多行编辑器。
to get the multiline editor for a string property.
但是,在Compact Framework中这是不可能的,因为不包括 System.ComponentModel
。
我已经有一个 DesigntimeAttributes.xmta
文件,我想我必须在这里定义它,但我找不到如何实现此目标的示例。
However, in Compact Framework this is not possible because System.ComponentModel
is not included.
I already have a DesigntimeAttributes.xmta
file and I suppose I have to define it here but I can't find an example on how to achive this.
推荐答案
以下xmta条目可在我的VS2008上解决问题:
The following xmta entry does the trick on my VS2008:
<Property Name="MultiLineText">
<Browsable>true</Browsable>
<Editor>
<BaseType>System.Drawing.Design.UITypeEditor, System.Drawing</BaseType>
<Type>System.ComponentModel.Design.MultilineStringEditor, System.Design</Type>
</Editor>
</Property>
这篇关于在紧凑型框架3.5中的用户控件(例如多行文本)中定义自定义设计时间编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文