• 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. 英文版firefox显示中文字体丑的问题

    在Options里面选择Content,在Fonts&Colors区域的Default font中,选择Times New Roman 如下图1: 在旁边的Advanced中选择,Fonts ...

  2. select()函数以及FD_ZERO、FD_SET、FD_CLR、FD_ISSET (转)

    select函数用于在非阻塞中,当一个套接字或一组套接字有信号时通知你,系统提供select函数来实现多路复用输入/输出模型,原型: #include <sys/time.h>       ...

  3. [OpenXml] Generate excel in memory and dump to file

    public static void GenerateExcelFromStream() { using (MemoryStream memoryStream = new MemoryStream() ...

  4. linux命令之ps命令

    1.管道 linux命令管道通过|表示.一般在linux命令中|(管道)之前的命令会输出大量的结果,|(管道)之后的命令一般就是带有条件的,只将|前满足条件的结果显示出来. 2.grep命令 grep ...

  5. 五个免费UML建模工具推荐

    UML工具很多是商用的,价格不菲:而免费的UML建模工具,功能完善的很少.以下推荐的是五个免费的UML建模工具,相对而言还算功能比较不错. 1.免费UML建模工具推荐:JUDE – community ...

  6. Redis源码研究--字符串

    之前看的内容,占个位子,以后补上. ------------8月2日------------- 好久没看了,惭愧,今天抽了点时间重新看了Redis的字符串,一边写博客,一边看. Redis的字符串主要 ...

  7. PHP中CURL技术模拟登陆抓取网站信息,用与微信公众平台成绩查询

    伴随微信的红火,微信公众平台成为许多开发者的下一个目标.笔者本身对于这种新鲜事物没有如此多的吸引力.但是最近有朋友帮忙开发微信公众平台中一个成绩查询的功能.于是便在空余时间研究了一番. 主要的实现步骤 ...

  8. lnmp安装--php安装

    版本:php5.6.4 x86_64 centos 6.6 x86_64 安装php之所以难,是因为要安装的扩展多,依赖关系复杂. 安装前的准备: 先看你想要安装哪些扩展.需要哪些包.下载地址:htt ...

  9. Python: tkinter实例改名小工具

    #!/usr/bin/env python #coding=utf-8 # # 版权所有 2014 yao_yu (http://blog.csdn.net/yao_yu_126) # 本代码以MIT ...

  10. Oracle回收站

    回收站是删除对象使用的存储空间.可以使用实例参数recyclebin禁用回收站,默认是on,可以为某个会话或系统设置为off或on.所有模式都有一个回收站. 当表空间不足时可以自动重用回收站对象占用的 ...