如何使用MultilineStringEditor? [英] How do i use the MultilineStringEditor?

查看:76
本文介绍了如何使用MultilineStringEditor?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我想在c#winforms应用程序中使用System.ComponentModel.Design命名空间中的MultilineStringEditor.

我的 意图是将其与propertygrid和自定义类一起使用.但是我 无法弄清楚怎么办,因为我无法做到,这不是属性 这会造成麻烦,该类似乎无法找到.

这是我的财产,我想通过多行装饰来更改.

[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Editor(typeof(System.ComponentModel.Design.MultilineStringEditor), typeof(System.Drawing.Design.UITypeEditor)]<-此行不是 正确的
公共字符串值
{
get {返回this._value; }
设置{this._value =值; }
}


Jonas

Hi

I'd like to use the MultilineStringEditor from the System.ComponentModel.Design namespace in a c# winforms application.

My intension is to use it with a propertygrid and a custom class. But i can't figure out how since I can't reach it, it's not the attributes that is causing trouble, the class seem like it can't be found.

This is my property which I'd like to change with a multiline edior.

    [Browsable(true)]
    [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
    [Editor(typeof(System.ComponentModel.Design.MultilineStringEditor), typeof(System.Drawing.Design.UITypeEditor)] <-- this row isn't correct
    public string Value
    {
      get { return this._value; }
      set { this._value = value; }
    }


Jonas

推荐答案

您的代码正确.你有什么问题?它是编译错误吗?如果是这样,则需要确保引用了编辑器所在的 System.Design 程序集.如果不是,那么您遇到什么问题?

迈克尔·泰勒(Michael Taylor)-2006年7月31日
Your code is correct.  What problem are you having?  Is it a compilation error?  If so then you need to ensure that you are referencing the System.Design assembly where the editor resides.  If not then what problem are you having?

Michael Taylor - 7/31/06


这篇关于如何使用MultilineStringEditor?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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