在紧凑框架3.5中的用户控件(例如,多行文本)中定义自定义设计时编辑器

时间:2016-02-18 07:28:15

标签: c# compact-framework

在.NET中我会写

[Editor(typeof(System.ComponentModel.Design.MultilineStringEditor), typeof(System.Drawing.Design.UITypeEditor))]
public string MultiLineText { get; set; }

获取字符串属性的多行编辑器。

但是,在Compact Framework中,这是不可能的,因为不包括System.ComponentModel。 我已经有一个DesigntimeAttributes.xmta文件,我想我必须在这里定义它,但我找不到如何实现这个的例子。

1 个答案:

答案 0 :(得分:3)

以下xmta条目可以解决我的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>
相关问题