[英]Define custom design time editor in a usercontrol (e.g. multiline text) in compact framework 3.5
在.NET中我會寫
[Editor(typeof(System.ComponentModel.Design.MultilineStringEditor), typeof(System.Drawing.Design.UITypeEditor))]
public string MultiLineText { get; set; }
獲取字符串屬性的多行編輯器。
但是,在Compact Framework中,這是不可能的,因為不包括System.ComponentModel
。 我已經有了一個DesigntimeAttributes.xmta
文件,我想我必須在這里定義它,但是我找不到一個關於如何實現這個的例子。
以下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>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.