簡體   English   中英

在緊湊框架3.5中的用戶控件(例如多行文本)中定義自定義設計時編輯器

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM