System.Drawing.Design.UITypeEditor自定义控件属性GetEditStyle(ITypeDescriptorContext context),EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
- 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
- }
- }
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.ComponentModel;
- using System.Drawing.Design;
- namespace xmlTojson
- {
- [System.Runtime.InteropServices.ComVisible(true)]
- public class MyTestUITypeEditor : UITypeEditor
- {
- public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
- {
- //return base.GetEditStyle(context);
- return UITypeEditorEditStyle.Modal;
- }
- public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
- {
- //return base.EditValue(context, provider, value);
- return value;
- }
- }
- }
System.Drawing.Design.UITypeEditor自定义控件属性GetEditStyle(ITypeDescriptorContext context),EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)的更多相关文章
- System.Drawing.Image.cs
ylbtech-System.Drawing.Image.cs 1.程序集 System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyTok ...
- winform 自定义控件属性在属性面板中显示
Jan.David Nothing is impossible, the word itself says 'I'm possible'!" — Audrey Hepburn winform ...
- c#自定义控件属性面板及选择资源设置
博客转移到 http://jacean.github.io/ 继续分享编程经验 因为要做流体布局,但两个控件没办法组合,就做自定义控件.这个控件需要一个text设置文本,一个pic设置图片显示,图片通 ...
- 类库探源——System.Drawing.Bitmap
一.System.Drawing.Bitmap Bitmap 类: 封装GDI+ 位图,此位图由图形图像及其属性的像素数据组成.Bitmap 是用于处理由像素定义的图像的对象 命名空间: System ...
- 类库探源——System.Drawing
一.System.Drawing 命名空间简述 System.Drawing 命名空间提供访问 GDI+ 的基本功能,更高级的功能在 System.Drawing.Drawing2D,System.D ...
- System.Drawing.Image.Save(Savepath),保存为jpg格式,参数错误,文件0kb解决办法
问题场景:asp.net给图片添加文字水印保存为jpg格式时出现标题所描述错误(图片为.jpg格式): 简单验证:用本机的画图程序打开,然后保存为jpg格式会出现警告框"画图程序不能存储该文 ...
- 使用打印方法时,要先引用命名空间: Using System.Drawing.Pringing
使用打印方法时,要先引用命名空间: Using System.Drawing.Pringing PrintDocument类的重要属性和方法:属性:DocumentName 设置打印文档时要显示的文 ...
- C# Pen绘制虚线(System.Drawing.Pen与System.Windows.Media.Pen)
一.绘制虚线的方法 GDI绘制,使用的是System.Drawing.Pen Pen pen = new Pen(Color.Red, 1); pen.DashStyle = S ...
- C#中怎样获取System.Drawing.Color的所有颜色对象并存到数组中
场景 需要在生成一组多条曲线时,随机从一颜色数组中取颜色,至少一百种颜色以上. 而System.Drawing.Color自带140多种颜色 那么怎样将其自带的颜色对象取出并存在数组中. 注: 博客主 ...
随机推荐
- javascript之高级函数应用思想
1.级联函数:应用对象方法调用的连写 function A(){ this.a = ''; this.b = ''; this.c = ''; } //改造一下 A.prototype = { A.p ...
- vector 内部方法大全 学习(初学者的参考资料)
1 vector构造函数:也就是如何对一个vector对象进行初始化 ////////////////////////////代码//////////////////////////////// ...
- IOS设备滑动事件
只要手指触摸屏幕,滑动,从屏幕离开,系统都会产生UIEvent对象类型的事件---当然包括UITouch事件 – touchesBegan:withEvent: 当用户触摸到屏幕时调用方法 – t ...
- easyui使用时出现这个Uncaught TypeError: Cannot read property 'combo' of undefined
easyui使用时出现这个Uncaught TypeError: Cannot read property 'nodeName' of undefined 最后检查发现是必须给select一个id,光 ...
- 泛形集合List<T>
public class Person { /// <summary> /// 姓名 /// </summary> private string name; public st ...
- chm文件打开,有目录没有内容
下载下来的一些chm文件,打开的是否提示“打开此文件前总是询问”,不理睬直接打开后,只有目录,页面内容都显示“已取消到本页的导航”.原因是该CHM文件的发行商未知,将“打开此文件前总是询问”选项取消后 ...
- Webx框架自带的petstore
Webx框架:http://openwebx.org/ petstore:webx3/webx-sample/petstore/tags/3.0/petstore 编译之后:mvn jetty:run ...
- spring4+hibernate3
环境说明:spring4.0+hibernate3 数据库:oracle 连接池:c3p0 项目结构: lib中的jar: 一.配置spring.xml 说明:这里采用的配置模式将hibernateT ...
- 团体程序设计天梯赛-练习集L2-003. 月饼
L2-003. 月饼 时间限制 100 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不 ...
- spoj 338
题意: 无向图 每条边有长度和费用两个属性 求从点1到点n 在花费不超过 k 的情况下的最短路径 BFS 使用优先队列 长度短的优先出列 题解上的方法没看懂 不知道怎么用链表维护 . ...