• 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. struts2中的常量

    struts2中的常量: 在:struts2-core-2.1.8.1\org\apache\struts2\default.properties 文件里 <!-- 配制i18n国际化--> ...

  2. 获取客户端访问的ip地址

    function real_ip() { static $realip = NULL; if ($realip !== NULL) { return $realip; } if (isset($_SE ...

  3. DTCMS添加文章,将tags标签的值赋到SEO关键词上,以及将摘要的值赋到SEO描述

    将tags标签的值赋到SEO关键词上 admin\article_edit.aspx中 $(function () {  方法中加上 //tags的值赋到SEO关键词上 $("#txtTag ...

  4. object-c实现的 在PHP中oauth加密算法

    说起这个算法,在php中我是这么实现的 function generateSig ($params, $secret = '') {     if (empty($secret)) {         ...

  5. dive into python 读笔(1)

    chapter2 and 3: 使用Python IDE来交互式地测试表达式 编写Python程序并且从IDE运行,或者从命令行运行 导入模块及调用它们的函数 声明函数以及doc string.局部变 ...

  6. C# Windows - ListView

    ListView控件的属性 属性 说明 Activation 控制用户在列表视图中激活选项的方式Standard - 用户为自己的计算机选择的值OneClick – 单击一个选项,激活它TwoClic ...

  7. IOS, xib和storyboard的混用--参考

    1. 从xib的viewcontroll中启动storyboard 或者 从一个storyboard切换到另一个storyboard: [objc]– (IBAction)openStoryboard ...

  8. Hibernate缓存机制简述 (转)

    感谢:http://blog.csdn.net/ramln1989/article/details/5528445 ------------------------------------------ ...

  9. 响应式菜单(bootstrap)

    <nav class="navbar navbar-default" role="navigation"> <div class=" ...

  10. CSRF防范策略研究

    目录 0x1:检查网页的来源 0x2:检查内置的隐藏变量 0x3:用POST不用GET 检查网页的来源应该怎么做呢?首先我们应该检查$_SERVER[“HTTP_REFERER”]的值与来源网页的网址 ...