• using System;
    • using System.Collections.Generic;
    • using System.Linq;
    • using System.Text;
    • using System.ComponentModel;
    • namespace xmlTojson
    • {
    • [Editor(typeof(MyTestUITypeEditor),typeof(System.Drawing.Design.UITypeEditor))]
    • [Browsable(true)]
    • public class MyTestProperty
    • {
    • #region Property
    • /// <summary>
    • /// 姓名
    • /// </summary>
    • private string _Name = null;
    • public string Name
    • {
    • get { return _Name; }
    • set { _Name = value; }
    • }
    • /// <summary>
    • /// 性别
    • /// </summary>
    • private string _Sex = null;
    • public string Sex
    • {
    • get { return _Sex; }
    • set { _Sex = value; }
    • }
    • /// <summary>
    • /// 年龄
    • /// </summary>
    • private string _Age = null;
    • public string Age
    • {
    • get { return _Age; }
    • set { _Age = value; }
    • }
    • #endregion
    • }
    • }
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel;
  6. using System.Drawing.Design;
  7. namespace xmlTojson
  8. {
  9. [System.Runtime.InteropServices.ComVisible(true)]
  10. public class MyTestUITypeEditor : UITypeEditor
  11. {
  12. public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
  13. {
  14. //return base.GetEditStyle(context);
  15. return UITypeEditorEditStyle.Modal;
  16. }
  17. public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
  18. {
  19. //return base.EditValue(context, provider, value);
  20. return value;
  21. }
  22. }
  23. }

System.Drawing.Design.UITypeEditor自定义控件属性GetEditStyle(ITypeDescriptorContext context),EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)的更多相关文章

  1. System.Drawing.Image.cs

    ylbtech-System.Drawing.Image.cs 1.程序集 System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyTok ...

  2. winform 自定义控件属性在属性面板中显示

    Jan.David Nothing is impossible, the word itself says 'I'm possible'!" — Audrey Hepburn winform ...

  3. c#自定义控件属性面板及选择资源设置

    博客转移到 http://jacean.github.io/ 继续分享编程经验 因为要做流体布局,但两个控件没办法组合,就做自定义控件.这个控件需要一个text设置文本,一个pic设置图片显示,图片通 ...

  4. 类库探源——System.Drawing.Bitmap

    一.System.Drawing.Bitmap Bitmap 类: 封装GDI+ 位图,此位图由图形图像及其属性的像素数据组成.Bitmap 是用于处理由像素定义的图像的对象 命名空间: System ...

  5. 类库探源——System.Drawing

    一.System.Drawing 命名空间简述 System.Drawing 命名空间提供访问 GDI+ 的基本功能,更高级的功能在 System.Drawing.Drawing2D,System.D ...

  6. System.Drawing.Image.Save(Savepath),保存为jpg格式,参数错误,文件0kb解决办法

    问题场景:asp.net给图片添加文字水印保存为jpg格式时出现标题所描述错误(图片为.jpg格式): 简单验证:用本机的画图程序打开,然后保存为jpg格式会出现警告框"画图程序不能存储该文 ...

  7. 使用打印方法时,要先引用命名空间: Using System.Drawing.Pringing

    使用打印方法时,要先引用命名空间: Using System.Drawing.Pringing PrintDocument类的重要属性和方法:属性:DocumentName  设置打印文档时要显示的文 ...

  8. C# Pen绘制虚线(System.Drawing.Pen与System.Windows.Media.Pen)

    一.绘制虚线的方法 GDI绘制,使用的是System.Drawing.Pen Pen pen = new Pen(Color.Red, 1);            pen.DashStyle = S ...

  9. C#中怎样获取System.Drawing.Color的所有颜色对象并存到数组中

    场景 需要在生成一组多条曲线时,随机从一颜色数组中取颜色,至少一百种颜色以上. 而System.Drawing.Color自带140多种颜色 那么怎样将其自带的颜色对象取出并存在数组中. 注: 博客主 ...

随机推荐

  1. ng-src作用

    ... <ul class="phones"> <li ng-repeat="phone in $ctrl.phones | filter:$ctrl. ...

  2. 通用SQL存储过程分页以及asp.net后台调用

    创建表格并添加300万数据 use Stored CREATE TABLE UserInfo( --创建表 id ,) PRIMARY KEY not null,--添加主键和标识列 UserName ...

  3. 链接中 href='#' 和 href='###' 的区别以及优缺点

    首先,<a> 标签 + onclick='{jscode}' 是很常用的一种 js 运用方式,而不使用 href='javascript:{jscode}' 是为了兼容多种浏览器对 < ...

  4. centos install(160112更新)

    centos安装之后: 更新 yum update 新增用户: useradd myuser passwd myuser 添加sudo: usermod -a -G wheel myuser //vi ...

  5. javascript获取ckeditor编辑器的值(实现代码)

    CKeditor编辑器是FCKeditor的升级版本想对于FCK来说,确实比较好用,加载速度也比较快以下是如果通过JS获取CKeditor编辑器的值,用于表单验证 if(CKEDITOR.instan ...

  6. Spark小课堂Week7 从Spark中一个例子看面向对象设计

    Spark小课堂Week7 从Spark中一个例子看面向对象设计 今天我们讨论了个问题,来设计一个Spark中的常用功能. 功能描述:数据源是一切处理的源头,这次要实现下加载数据源的方法load() ...

  7. Catalyst揭秘 Day7 SQL转为RDD的具体实现

    Catalyst揭秘 Day7 SQL转为RDD的具体实现 从技术角度,越底层和硬件偶尔越高,可动弹的空间越小,而越高层,可动用的智慧是更多.Catalyst就是个高层的智慧. Catalyst已经逐 ...

  8. Python调用C模块以及性能分析

    一.c,ctypes和python的数据类型的对应关系 ctypes type ctype Python type c_char char 1-character string c_wchar wch ...

  9. sublime text2 配置php调试环境

    步骤一: 首先确保你电脑安装了php,并把php设置到环境变量里了. 步骤二: 点击 sublime_text的“工具”->"编译系统"->"编译新系统&qu ...

  10. Google code: Why ‘Everything up-to-date’ when pushing (git)

    原文链接:http://blog.rexzhao.com/2011/11/28/google-code-git-everything-up-to-date-when-push.html 第一次在Goo ...