ryControls
控件状态
无
获得焦点
失去焦点
鼠标指针进入控件
Toolbar控件
获取或设置控件显示的图片
重写控件焦点属性
自定义绘制
焦点进入
失去焦点
禁止调整大小
只响应单击鼠标左键事件
按比例缩放图片
图片缩放
源图片
缩放图片的宽度
缩放图片的高度
缩放的图片
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要
使用代码编辑器修改此方法的内容。
绘图对像
绘图对像
图片
绘置的图片大小、坐标
绘置的图片边界
当前状态
状态总数
绘图对像
绘图对像
图片对像
绘置的图片大小、坐标
当前状态
状态总数
得到要绘置的图片对像
图像在程序集中的地址
得到要绘置的图片对像
图像在程序集中的路径
图像在程序集中的地址
获取资源图标
得到图程序集中的图片对像
图像在程序集中的地址
得到图程序集中的图片对像
图像在程序集中的路径
图像在程序集中的地址
控件的状态。
正常
鼠标经过
鼠标按下
鼠标的当前位置
美化按钮
普通按钮矩形位置
美化按钮
分割按钮的宽度
是否启用分割按钮
优先使用默认皮肤
按钮基础背景色
按钮字体颜色
图片宽度,默认值为18px,最小12px
圆角的位置,默认全部都是圆角
设置圆角半径
背景色是否渐变
图片高度
图片与文字之间的间距
当鼠标按下时图片和文字是否产生偏移
鼠标进入时
鼠标离开
鼠标按下
鼠标弹起
鼠标当前所在位置
获取图像以及文字的位置
添加菜单分隔线
添加菜单
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
增强版Label(禁用了双击Label会自动复制文本到剪切板的功能)
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
增强富文本控件
开始更新
结束更新
RichTextBox
在自带菜单弹出前激发
根据标签获得菜单项
只允许输入文本(只对设置之后的人工输入有效)
按下按键
鼠标按下
当文本框为空时,显示的内容。
添加菜单分隔线
添加菜单
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
消息列表控件
最大高度
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要
使用代码编辑器修改此方法的内容。
建立圆角路径的样式。
四个角都不是圆角。
四个角都为圆角。
左边两个角为圆角。
右边两个角为圆角。
上边两个角为圆角。
下边两个角为圆角。
左下角为圆角。
右下角为圆角。
画图相关API
建立带有圆角样式的路径。
用来建立路径的矩形。
圆角的大小。
圆角的样式。
是否把矩形长宽减 1,以便画出边框。
建立的路径。
窗体皮肤
窗体皮肤
标题属性
是否使用父窗口的图标
点击最小化按钮是最小化还是隐藏
最大化按钮
最小化按钮
标题栏关闭按钮是否显示
当窗口位于后台时,是否标注显示。
标题栏字体颜色
标题栏不处于活动状态时的字体颜色
标题栏背景颜色
标题栏不处于活动状态时的背景颜色
是否允许拖拉窗体边缘来改变窗体大小
画边框
Required designer variable.
Clean up any resources being used.
true if managed resources should be disposed; otherwise, false.
Required method for Designer support - do not modify
the contents of this method with the code editor.
热键文本框
热键文本框
在控件大小变化时发生
此属性无效
载入热键配置
保存热键
是否含义热键
读取或设置热键
功能键
热键按键
KeyDown事件
KeyDown事件
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要
使用代码编辑器修改此方法的内容。
图标列表控件
图标列表控件
图标大小
文本显示高度(从底部算起)
默认图标
是否显示图标
是否显示网格线
角标图标合集
画项
选择项的背景开始颜色
选择项的背景结束颜色
选择项的边框颜色
选择项的字体颜色
重绘选中时背景
重绘图标
区域大小
重绘文本
获取文本对齐
水平滚动条滚动事件
垂直滚动条滚动事件
列表项
图标
角标图片序号,为-1表示无角标
最大高度
标题
是否显示时间
添加时间
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要
使用代码编辑器修改此方法的内容。
最大高度
标题
是否显示时间
添加时间
内容
网址
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要
使用代码编辑器修改此方法的内容。
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
图标
标题
悬浮提示
标题颜色
设置按钮
判断和设置是否选择
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
绘制边框
消息
类说明:CContextMenuStrip控件的实现用来代替系统的ContextMenuStrip控件
重写OnCreateControl
重写OnPaint事件
CreateRoundedRectanglePath
Rectangle
系统热键数据类。
系统热键数据类
使多行属性失效掉
使只读属性失效掉
获取热键文本
功能键
热键按键
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要
使用代码编辑器修改此方法的内容。
增强时间控件
增强时间控件
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
选择文本框
选择文本框
按钮基础背景色
优先使用默认皮肤
选择的id
选择的名称
选择的名称
字体
重新设置大小
在选择时激发
点击选择
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
可以改变文本行距(行间距)的Label
行间距
可以改变文本行距(行间距)的Label
字体高度
文本
计算两个日期的时间间隔,返回的是日期值+
时间值,将显示在返回的值里
参照时间
控件边框颜色
控件背景颜色
圆角弧度大小
圆角风格
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
在搜索时激发
文本变化时激发
文本变化时激发
双击时激发
文本为空时的显示效果
文本不选中
有内容时的显示效果
当文本框为空时,显示的内容。
字体
优先使用默认皮肤
背景色是否渐变
按钮基础背景色
按钮圆角部分背景颜色
重新设置大小
点击搜索按钮
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
使用公共皮肤
按钮颜色
皮肤公共类
是否使用默认皮肤
按钮皮肤
按钮皮肤类
背景颜色
字体颜色
是否颜色渐变
类说明:帮助类
修改控件或窗体的边框,例如Textbox或是Form窗体
消息
控件对象
边框像素
边框颜色
超级图片控件,支持加载工程内部图片、异步加载网络图片
超级图片控件,支持加载工程内部图片、异步加载网络图片
图片所在上级域名
图片资源所在上级文件夹
根据不同前缀,加载不同格式图片。i:表示工程内置图片;s:表示T_ImageDomain域名下的图片,u:表示指定url的图片;f:表示本地图片
加载本地图片,加载完毕不会占用本地图片
加载指定url图片
url位置
是否异步
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要
使用代码编辑器修改此方法的内容。
多标签控件
选项发生变化时激发
标签选择的序号
选择的颜色
多标签控件颜色
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
多标签控件
获取对应的标签
美化文本框控件
文本变化时激发
文本变化时激发
双击时激发
是否只能输入数字
是否多行
是否在显示不下时换行
最大长度
背景颜色
右键菜单
字体颜色
选择的开始位置
选择的长度
选择的文本
提示文本
选择全部
密码
是否只读
文本为空时的显示效果
字体
有内容时的显示效果
当文本框为空时,显示的内容。
选择文本框中的文本范围
文本框中当前选定文本的第一个字符的位置。
要选择的字符数
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
Define some Windows message constants
This class adds to the functionality provided in System.Windows.Forms.MenuStrip.
It allows you to "ClickThrough" to the MenuStrip so that you don't have to click once to
bring the form into focus and once more to take the desired action
It also implements a SuppressHighlighting property to turn off the highlighting
that occures on mouseover when the form is not active
Gets or sets whether the control honors item clicks when its containing form does
not have input focus.
Default value is false, which is the same behavior provided by the base ToolStrip class.
Gets or sets whether the control shows highlighting on mouseover
Default value is true, which is the same behavior provided by the base MenuStrip class.
This method overrides the procedure that responds to Windows messages.
It intercepts the WM_MOUSEMOVE message
and ignores it if SuppressHighlighting is on and the TopLevelControl does not contain the focus.
Otherwise, it calls the base class procedure to handle the message.
It also intercepts the WM_MOUSEACTIVATE message and replaces an "Activate and Eat" result with
an "Activate" result if ClickThrough is enabled.
This class adds to the functionality provided in System.Windows.Forms.ToolStrip.
It allows you to "ClickThrough" to the MenuStrip so that you don't have to click once to
bring the form into focus and once more to take the desired action
It also implements a SuppressHighlighting property to turn off the highlighting
that occures on mouseover when the form is not active
Gets or sets whether the control honors item clicks when its containing form does
not have input focus.
Default value is false, which is the same behavior provided by the base ToolStrip class.
Gets or sets whether the control shows highlighting on mouseover
Default value is true, which is the same behavior provided by the base MenuStrip class.
This method overrides the procedure that responds to Windows messages.
It intercepts the WM_MOUSEMOVE message
and ignores it if SuppressHighlighting is on and the TopLevelControl does not contain the focus.
Otherwise, it calls the base class procedure to handle the message.
It also intercepts the WM_MOUSEACTIVATE message and replaces an "Activate and Eat" result with
an "Activate" result if ClickThrough is enabled.
还原
移动
大小
最小化
最大化
关闭
透明图片控件
是否使用透明,默认为True
设置透明度
要绑定的控件
透明图片控件
图片
初始化加载控件
透明度
是否显示加载图片
图片
显示加载
隐藏加载
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
一个强类型的资源类,用于查找本地化的字符串等。
返回此类使用的缓存的 ResourceManager 实例。
重写当前线程的 CurrentUICulture 属性,对
使用此强类型资源类的所有资源查找执行重写。
查找 System.Drawing.Bitmap 类型的本地化资源。
查找 System.Drawing.Bitmap 类型的本地化资源。
查找 System.Drawing.Bitmap 类型的本地化资源。
查找 System.Drawing.Bitmap 类型的本地化资源。
查找 System.Drawing.Bitmap 类型的本地化资源。
查找 System.Drawing.Bitmap 类型的本地化资源。
查找 System.Drawing.Bitmap 类型的本地化资源。
获得当前进程,以便重绘控件
是否启用热点效果
边框颜色
热点边框颜色
是否鼠标MouseOver状态
是否启用热点效果
边框颜色
热点时边框颜色
鼠标移动到该控件上时
当鼠标从该控件移开时
当该控件获得焦点时
当该控件失去焦点时
获得操作系统消息
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
日控件
日控件
当前日期
在发生页码变化前激发
设置休息状态,1为休息,-1为上班,其它为不显示
日期
农历
阳历日期字体颜色
阳历日期字体
农历日期字体
农历部分字体颜色
是否选中
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
日历控件
单击事件
单击某个日期事件
日历控件
设置日期
放假数据表
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
设置管理类,快速添加设置。
设置管理类,快速添加设置。
设置管理类,快速添加设置。
存储类型
配置存储路径
设置XML内容
添加控件
设置值
添加控件
添加控件
添加控件
添加控件
添加控件
添加控件
添加控件
添加控件
添加控件
添加控件
读取配置
保存配置
Required designer variable.
Clean up any resources being used.
true if managed resources should be disposed; otherwise, false.
Required method for Designer support - do not modify
the contents of this method with the code editor.
类 名:ColorHSL
功 能:H 色相 \ S 饱和度(纯度) \ L 亮度 颜色模型
日 期:2015-02-08
修 改:2015-03-20
作 者:ls9512
HSL颜色
色相
饱和度(纯度)
饱和度
类 名:ColorHSV
功 能:H 色相 \ S 饱和度(纯度) \ V 明度 颜色模型
日 期:2015-01-22
修 改:2015-03-20
作 者:ls9512
构造方法
色相
饱和度(纯度)
明度
类 名:ColorRGB
功 能:R 红色 \ G 绿色 \ B 蓝色 颜色模型
所有颜色模型的基类,RGB是用于输出到屏幕的颜色模式,所以所有模型都将转换成RGB输出
日 期:2015-01-22
修 改:2015-03-20
作 者:ls9512
构造方法
红色
绿色
蓝色
获取实际颜色
类 名:ColorHelper
功 能:提供从RGB到HSV/HSL色彩空间的相互转换
日 期:2015-02-08
修 改:2015-03-20
作 者:ls9512
RGB转换HSV
HSV转换RGB
RGB转换HSL
HSL转换RGB
H, S and L input range = 0 -1.0
RGB转CMYK
RGB转CMYK
CMYK转RGB
Standard-RGB → XYZ,X、Y、Z 使用 D65/2°标准光源.
XYZ → Standard-RGB,X、Y、Z 使用 D65/2°标准光源.
XYZ → Adobe-RGB,X、Y、Z 使用 D65/2°标准光源.RGB Adobe 1998
Adobe-RGB → XYZ,X、Y、Z 使用 D65/2°标准光源.RGB Adobe 1998
Yxy转RGB
RGB转Yxy
超级颜色选择控件
获取网页颜色
超级颜色选择控件
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
Chrome风格的多标签控件
设置选项卡处于选中状态时第一背景色.
设置选项卡处于选中状态时第二背景色.
设置选项卡处于非选中状态时第一背景色.
设置选项卡处于非选中状态时第二背景色.
设置鼠标移动到非选中状态选项卡时第一背景色.
设置鼠标移动到非选中状态选项卡时第二背景色.
设置选项卡工作区背景色.
设置选项卡工作区背景图.
是否显示关闭按钮
是否显示新增按钮
是否允许拖拽标签
标签最大宽度
标签右键菜单
鼠标按下标签时激发
鼠标放开标签时激发
Chrome风格的多标签控件
画标签文字
画标签图标
画关闭按钮
添加新标签
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要
使用代码编辑器修改此方法的内容。
The position is not over a tab.
The position is over a tab's icon.
The position is over a tab's text.
The position is over a tab but not over its icon or its text. For owner-drawn tab controls, this value is specified if the position is anywhere over a tab.
TCHT_ONITEM is a bitwise-OR operation on TCHT_ONITEMICON and TCHT_ONITEMLABEL.
Specifies values from SetWindowPosZ enumeration.
Specified HWND_TOP enumeration value.
Specified HWND_BOTTOM enumeration value.
Specified HWND_TOPMOST enumeration value.
Specified HWND_NOTOPMOST enumeration value.
Invalidates the rectangle or region that you specify in lprcUpdate or hrgnUpdate.
You can set only one of these parameters to a non-NULL value. If both are NULL, RDW_INVALIDATE invalidates the entire window.
Causes the OS to post a WM_PAINT message to the window regardless of whether a portion of the window is invalid.
Causes the window to receive a WM_ERASEBKGND message when the window is repainted.
Specify this value in combination with the RDW_INVALIDATE value; otherwise, RDW_ERASE has no effect.
Validates the rectangle or region that you specify in lprcUpdate or hrgnUpdate.
You can set only one of these parameters to a non-NULL value. If both are NULL, RDW_VALIDATE validates the entire window.
This value does not affect internal WM_PAINT messages.
Suppresses any pending WM_ERASEBKGND messages.
Excludes child windows, if any, from the repainting operation.
Includes child windows, if any, in the repainting operation.
Causes the affected windows, which you specify by setting the RDW_ALLCHILDREN and RDW_NOCHILDREN values, to receive WM_ERASEBKGND and WM_PAINT messages before the RedrawWindow returns, if necessary.
Causes the affected windows, which you specify by setting the RDW_ALLCHILDREN and RDW_NOCHILDREN values, to receive WM_ERASEBKGND messages before RedrawWindow returns, if necessary.
The affected windows receive WM_PAINT messages at the ordinary time.
Specifies values from Msgs enumeration.
Specified WM_NULL enumeration value.
Specified WM_CREATE enumeration value.
Specified WM_DESTROY enumeration value.
Specified WM_MOVE enumeration value.
Specified WM_SIZE enumeration value.
Specified WM_ACTIVATE enumeration value.
Specified WM_SETFOCUS enumeration value.
Specified WM_KILLFOCUS enumeration value.
Specified WM_ENABLE enumeration value.
Specified WM_SETREDRAW enumeration value.
Specified WM_SETTEXT enumeration value.
Specified WM_GETTEXT enumeration value.
Specified WM_GETTEXTLENGTH enumeration value.
Specified WM_PAINT enumeration value.
Specified WM_CLOSE enumeration value.
Specified WM_QUERYENDSESSION enumeration value.
Specified WM_QUIT enumeration value.
Specified WM_QUERYOPEN enumeration value.
Specified WM_ERASEBKGND enumeration value.
Specified WM_SYSCOLORCHANGE enumeration value.
Specified WM_ENDSESSION enumeration value.
Specified WM_SHOWWINDOW enumeration value.
Specified WM_WININICHANGE enumeration value.
Specified WM_SETTINGCHANGE enumeration value.
Specified WM_DEVMODECHANGE enumeration value.
Specified WM_ACTIVATEAPP enumeration value.
Specified WM_FONTCHANGE enumeration value.
Specified WM_TIMECHANGE enumeration value.
Specified WM_CANCELMODE enumeration value.
Specified WM_SETCURSOR enumeration value.
Specified WM_MOUSEACTIVATE enumeration value.
Specified WM_CHILDACTIVATE enumeration value.
Specified WM_QUEUESYNC enumeration value.
Specified WM_GETMINMAXINFO enumeration value.
Specified WM_PAINTICON enumeration value.
Specified WM_ICONERASEBKGND enumeration value.
Specified WM_NEXTDLGCTL enumeration value.
Specified WM_SPOOLERSTATUS enumeration value.
Specified WM_DRAWITEM enumeration value.
Specified WM_MEASUREITEM enumeration value.
Specified WM_DELETEITEM enumeration value.
Specified WM_VKEYTOITEM enumeration value.
Specified WM_CHARTOITEM enumeration value.
Specified WM_SETFONT enumeration value.
Specified WM_GETFONT enumeration value.
Specified WM_SETHOTKEY enumeration value.
Specified WM_GETHOTKEY enumeration value.
Specified WM_QUERYDRAGICON enumeration value.
Specified WM_COMPAREITEM enumeration value.
Specified WM_GETOBJECT enumeration value.
Specified WM_COMPACTING enumeration value.
Specified WM_COMMNOTIFY enumeration value.
Specified WM_WINDOWPOSCHANGING enumeration value.
Specified WM_WINDOWPOSCHANGED enumeration value.
Specified WM_POWER enumeration value.
Specified WM_COPYDATA enumeration value.
Specified WM_CANCELJOURNAL enumeration value.
Specified WM_NOTIFY enumeration value.
Specified WM_INPUTLANGCHANGEREQUEST enumeration value.
Specified WM_INPUTLANGCHANGE enumeration value.
Specified WM_TCARD enumeration value.
Specified WM_HELP enumeration value.
Specified WM_USERCHANGED enumeration value.
Specified WM_NOTIFYFORMAT enumeration value.
Specified WM_CONTEXTMENU enumeration value.
Specified WM_STYLECHANGING enumeration value.
Specified WM_STYLECHANGED enumeration value.
Specified WM_DISPLAYCHANGE enumeration value.
Specified WM_GETICON enumeration value.
Specified WM_SETICON enumeration value.
Specified WM_NCCREATE enumeration value.
Specified VK_RMENU enumeration value.
Specified WM_NCCALCSIZE enumeration value.
Specified WM_NCHITTEST enumeration value.
Specified WM_NCPAINT enumeration value.
Specified WM_NCACTIVATE enumeration value.
Specified WM_GETDLGCODE enumeration value.
Specified WM_SYNCPAINT enumeration value.
Specified WM_NCMOUSEMOVE enumeration value.
Specified WM_NCLBUTTONDOWN enumeration value.
Specified WM_NCLBUTTONUP enumeration value.
Specified WM_NCLBUTTONDBLCLK enumeration value.
Specified WM_NCRBUTTONDOWN enumeration value.
Specified WM_NCRBUTTONUP enumeration value.
Specified WM_NCRBUTTONDBLCLK enumeration value.
Specified WM_NCMBUTTONDOWN enumeration value.
Specified WM_NCMBUTTONUP enumeration value.
Specified WM_NCMBUTTONDBLCLK enumeration value.
Specified WM_NCXBUTTONDOWN enumeration value.
Specified WM_NCXBUTTONUP enumeration value.
Specified WM_KEYDOWN enumeration value.
Specified WM_KEYUP enumeration value.
Specified WM_CHAR enumeration value.
Specified WM_DEADCHAR enumeration value.
Specified WM_SYSKEYDOWN enumeration value.
Specified WM_SYSKEYUP enumeration value.
Specified WM_SYSCHAR enumeration value.
Specified WM_SYSDEADCHAR enumeration value.
Specified WM_KEYLAST enumeration value.
Specified WM_IME_STARTCOMPOSITION enumeration value.
Specified WM_IME_ENDCOMPOSITION enumeration value.
Specified WM_IME_COMPOSITION enumeration value.
Specified WM_IME_KEYLAST enumeration value.
Specified WM_INITDIALOG enumeration value.
Specified WM_COMMAND enumeration value.
Specified WM_SYSCOMMAND enumeration value.
Specified WM_TIMER enumeration value.
Specified WM_HSCROLL enumeration value.
Specified WM_VSCROLL enumeration value.
Specified WM_INITMENU enumeration value.
Specified WM_INITMENUPOPUP enumeration value.
Specified WM_MENUSELECT enumeration value.
Specified WM_MENUCHAR enumeration value.
Specified WM_ENTERIDLE enumeration value.
Specified WM_MENURBUTTONUP enumeration value.
Specified WM_MENUDRAG enumeration value.
Specified WM_MENUGETOBJECT enumeration value.
Specified WM_UNINITMENUPOPUP enumeration value.
Specified WM_MENUCOMMAND enumeration value.
Specified WM_CTLCOLORMSGBOX enumeration value.
Specified WM_CTLCOLOREDIT enumeration value.
Specified WM_CTLCOLORLISTBOX enumeration value.
Specified WM_CTLCOLORBTN enumeration value.
Specified WM_CTLCOLORDLG enumeration value.
Specified WM_CTLCOLORSCROLLBAR enumeration value.
Specified WM_CTLCOLORSTATIC enumeration value.
Specified WM_MOUSEMOVE enumeration value.
Specified WM_LBUTTONDOWN enumeration value.
Specified WM_LBUTTONUP enumeration value.
Specified WM_LBUTTONDBLCLK enumeration value.
Specified WM_RBUTTONDOWN enumeration value.
Specified WM_RBUTTONUP enumeration value.
Specified WM_RBUTTONDBLCLK enumeration value.
Specified WM_MBUTTONDOWN enumeration value.
Specified WM_MBUTTONUP enumeration value.
Specified WM_MBUTTONDBLCLK enumeration value.
Specified WM_MOUSEWHEEL enumeration value.
Specified WM_XBUTTONDOWN enumeration value.
Specified WM_XBUTTONUP enumeration value.
Specified WM_XBUTTONDBLCLK enumeration value.
Specified WM_PARENTNOTIFY enumeration value.
Specified WM_ENTERMENULOOP enumeration value.
Specified WM_EXITMENULOOP enumeration value.
Specified WM_NEXTMENU enumeration value.
Specified WM_SIZING enumeration value.
Specified WM_CAPTURECHANGED enumeration value.
Specified WM_MOVING enumeration value.
Specified WM_DEVICECHANGE enumeration value.
Specified WM_MDICREATE enumeration value.
Specified WM_MDIDESTROY enumeration value.
Specified WM_MDIACTIVATE enumeration value.
Specified WM_MDIRESTORE enumeration value.
Specified WM_MDINEXT enumeration value.
Specified WM_MDIMAXIMIZE enumeration value.
Specified WM_MDITILE enumeration value.
Specified WM_MDICASCADE enumeration value.
Specified WM_MDIICONARRANGE enumeration value.
Specified WM_MDIGETACTIVE enumeration value.
Specified WM_MDISETMENU enumeration value.
Specified WM_ENTERSIZEMOVE enumeration value.
Specified WM_EXITSIZEMOVE enumeration value.
Specified WM_DROPFILES enumeration value.
Specified WM_MDIREFRESHMENU enumeration value.
Specified WM_IME_SETCONTEXT enumeration value.
Specified WM_IME_NOTIFY enumeration value.
Specified WM_IME_CONTROL enumeration value.
Specified WM_IME_COMPOSITIONFULL enumeration value.
Specified WM_IME_SELECT enumeration value.
Specified WM_IME_CHAR enumeration value.
Specified WM_IME_REQUEST enumeration value.
Specified WM_IME_KEYDOWN enumeration value.
Specified WM_IME_KEYUP enumeration value.
Specified WM_MOUSEHOVER enumeration value.
Specified WM_UNDO enumeration value.
Specified WM_RENDERFORMAT enumeration value.
Specified WM_RENDERALLFORMATS enumeration value.
Specified WM_DESTROYCLIPBOARD enumeration value.
Specified WM_DRAWCLIPBOARD enumeration value.
Specified WM_PAINTCLIPBOARD enumeration value.
Specified WM_VSCROLLCLIPBOARD enumeration value.
Specified WM_SIZECLIPBOARD enumeration value.
Specified WM_ASKCBFORMATNAME enumeration value.
Specified WM_CHANGECBCHAIN enumeration value.
Specified WM_HSCROLLCLIPBOARD enumeration value.
Specified WM_QUERYNEWPALETTE enumeration value.
Specified WM_PALETTEISCHANGING enumeration value.
Specified WM_PALETTECHANGED enumeration value.
Specified WM_HOTKEY enumeration value.
Specified WM_PRINT enumeration value.
Specified WM_PRINTCLIENT enumeration value.
Specified WM_HANDHELDFIRST enumeration value.
Specified WM_HANDHELDLAST enumeration value.
Specified WM_AFXFIRST enumeration value.
Specified WM_AFXLAST enumeration value.
Specified WM_PENWINFIRST enumeration value.
Specified WM_PENWINLAST enumeration value.
Specified WM_APP enumeration value.
Specified WM_USER enumeration value.
Specified WM_REFLECT enumeration value.
Specified WM_THEMECHANGED enumeration value.
关键词
密码
权限用户id
返回关键词
树形控件,用于分类用
显示在第一位的名称
是否显示菜单
树形控件
判断指定节点是否是目标节点的子节点
判断当前节点,当前用户是否有权限访问
权限事件
选择权限用户时发生
数据变化时发生
数据变化前发生
操作事件
在添加分组前发生
在修改分组前发生
在删除分组前发生
在设置密码前发生
在设置权限前发生
获取新的关键词分类
根据id获取节点
根据节点获取节点信息
设置节点信息
设置节点关键词和密码
设置节点密码
设置节点关键词
设置节点用户
RecursionTreeControl:表示将XML文件的内容显示在TreeView控件中
将要加载的XML文件中的节点元素
将要加载的XML文件中的节点集合
把XML文本载入到列表中
把XML文件载入到列表中
将列表保存为xml文本
改变所有子节点的状态
反选子节点
根据关键词来选中列表
根据关键词来选中列表
格式化关键字(会去除重复项),以便存入数据库
去除掉重复项
获取当前选中项以及所有父项的关键词组合
获取选中的
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要
使用代码编辑器修改此方法的内容。
是否为添加
选择的文本
选择的Tag
选择的图片序号
Required designer variable.
Clean up any resources being used.
true if managed resources should be disposed; otherwise, false.
Required method for Designer support - do not modify
the contents of this method with the code editor.
Required designer variable.
Clean up any resources being used.
true if managed resources should be disposed; otherwise, false.
Required method for Designer support - do not modify
the contents of this method with the code editor.
旧密码
新密码
Required designer variable.
Clean up any resources being used.
true if managed resources should be disposed; otherwise, false.
Required method for Designer support - do not modify
the contents of this method with the code editor.
Required designer variable.
Clean up any resources being used.
true if managed resources should be disposed; otherwise, false.
Required method for Designer support - do not modify
the contents of this method with the code editor.
颜色标签
行间距
颜色标签
更新
字体高度
控件高
控件文本
获取过滤掉颜色的字
改变字体
分页控件
首页文本
上一页文本
下一页文本
末页文本
跳页文本
页面信息文本
存储SQL参数
最后一页的页码
在发生页码变化时激发
在发生页码变化前激发
设置/返回每页显示的量大小
设置/返回记录总数
设置/返回分页SQL语句,{pagecount}表示页数,{recordcount}表示记录总数,{pagesize}表示页面大小,
{pageindex}表示当前页数,{recordnum}表示当前页记录数,{pageendnum}表示当前页最后一条记录的记录数
设置/返回当{recordnum}小于等于0时的分页SQL语句(比如第一页),如果为空,则默认使用SQLText值。{pagecount}表示页数,
{recordcount}表示记录总数,{pagesize}表示页面大小,{pageindex}表示当前页数,{recordnum}表示当前页记录数,{pageendnum}表示当前页最后一条记录的记录数
获取当前页码
设置分页语句为MSSQL分页语句
表名
条件判断sql语句,注意不包含where,以及不包含排序语句;,如果不存在条件判断语句,请为空
排序语句,必须包含Order By;,如果不存在排序语句,请为空
获取MSSQL数据库指定条件的记录总数
表名
条件判断sql语句,注意不包含where,以及不包含排序语句;,如果不存在条件判断语句,请为空
排序语句,必须包含Order By;,如果不存在排序语句,请为空
设置分页语句为SQLite分页语句
表名
条件判断sql语句,注意不包含where,可包含order by,如果不存在条件判断语句,请为空
获取SQLite数据库指定条件的记录总数
表名
条件判断sql语句,注意不包含where,可包含order by,如果不存在条件判断语句,请为空
返回分页SQL语句
分页控件
设置当前页为指定页
下一页
上一页
末页
首页
必需的设计器变量。
清理所有正在使用的资源。
如果应释放托管资源,为 true;否则为 false。
设计器支持所需的方法 - 不要
使用代码编辑器修改此方法的内容。
自动排列控件
最大列数
开始排列的坐标
下一项的位置
下一项的右下角坐标
竖向间隔像素
横向间隔像素
最小保留右边距,只对ReDraw2有效
自动排列控件构造函数
自动排列控件构造函数
开始排列控件
开始排列控件,当列数超过显示空间时,自动换行
加入的控件列表
初始化添加,自动将容器设置为滚动条自动显示
添加控件
删除控件
删除控件
清空所有控件
This enum represents the possible browser commands
Used when no commans are available
Used in the new navigation events
The URL to navigate to
The name of the frame to navigate to
The flags when opening a new window
The pointer to ppDisp
Creates a new instance of WebBrowserExtendedNavigatingEventArgs
Pointer to the automation object of the browser
The URL to go to
The name of the frame
The new window flags
Used in the new navigation events
查看源码
复制当前选中区
粘贴当前选中区
剪切当前选中区
全选
清除当前选中区的选中状态。
从当前选中区中删除全部超级链接。
从当前选中区中删除全部书签。
删除当前选中区
重做
撤销
从当前选中区中删除格式化标签。
点击节点
点击节点
点击元素
节点名
属性
属性值
等待毫秒数
第几个符合的元素,从1开始
等待多时毫秒
Represents event information for the main form, when the command state of the active browser changes
Creates a new instance of the class
A list of commands that are available
Gets a list of commands that are available
An extended version of the control.
在页面弹出消息对话框时激发
打开页面并等待页面加载完毕
要打开的页面地址
小于等于0,则表示一直等待,否则表示等待指定秒后,如果依然没有加载完毕,就直接返回
等待页面加载完毕
小于等于0,则表示一直等待,否则表示等待指定秒后,如果依然没有加载完毕,就直接返回
等待指定毫秒
等待指定毫秒
获取网页源代码,可以自动去除乱码
加载html文本到浏览器中
加载html文本到浏览器中
强制用本窗体打开新链接
This method supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Called by the control when the underlying ActiveX control is created.
This method supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Called by the control when the underlying ActiveX control is discarded.
Returns the automation object for the web browser
This method will be called to give you a chance to create your own event sink
Detaches the event sink
在文档下载开始时激发
Raises the event
Empty
You could start an animation or a notification that downloading is starting
下载完成后触发
Here you could start monitoring for script errors.
Raises the event
Empty
在开始浏览新网页时激发.
在打开新的网页窗口时激发
Raises the event
Thrown when BrowserExtendedNavigatingEventArgs is null
Raises the event
Thrown when BrowserExtendedNavigatingEventArgs is null
新窗口事件,只限Window XP SP2或以上系统支持
/
Overridden
The send to this procedure
A list of all the available window messages
Raises the event
在网页窗口关闭时激发
Do not confuse this with DWebBrowserEvents2.Quit... That's something else.
Flags used by INewWindowManager::EvaluateNewWindow.
These values are taken into account in the decision of whether to display a pop-up window.
No information Present
The page is unloading. This flag is set in response to the onbeforeunload and onunload events.
Some pages load pop-up windows when you leave them rather than when you enter. This flag is used to identify those situations.
The call to INewWindowManager::EvaluateNewWindow is the result of a user-initiated action
(a mouse click or key press). Use this flag in conjunction with the NWMF_FIRST_USERINITED flag
to determine whether the call is a direct or indirect result of the user-initiated action.
When NWMF_USERINITED is present, this flag indicates that the call to
INewWindowManager::EvaluateNewWindow is the first query that results from this user-initiated action.
Always use this flag in conjunction with NWMF_USERINITED.
The override key (ALT) was pressed. The override key is used to bypass the pop-up manager梐llowing
all pop-up windows to display梐nd must be held down at the time that INewWindowManager::EvaluateNewWindow is called.
The new window attempting to load is the result of a call to the showHelp method. Help is sometimes displayed in a separate window,
and this flag is valuable in those cases.
The new window is a dialog box that displays HTML content.
Indicates that the EvaluateNewWindow method is being called through a marshalled Component Object Model (COM) proxy
from another thread. In this situation, the method should make a decision and return immediately without performing
blocking operations such as showing modal user interface (UI). Lengthy operations will cause the calling thread to
appear unresponsive.
HRESULT constants
a form that supports custom theme
标签新建按钮事件
标签关闭按钮事件
标签创建时事件
在标签栏创建时激发
内边距
默认内边距
标题
皮肤/主题
是否可拖动改变窗体大小
窗体边界大小,鼠标移动到该边界将变成指针形状,拖动可改变窗体大小
窗体边框大小
标题栏高度
窗体圆角程度
窗体圆角样式
控制按钮相对于右上角的偏移量
关闭/最大化/最小化按钮之间的距离,可以设置成负值使它们重叠
标题栏图标尺寸
标题栏图标与窗体左边框的距离
标题距离左边的距离
窗体关闭按钮的尺寸
窗体最大化/还原按钮的大小
窗体最小化按钮的大小
是否显示阴影
窗体阴影宽度
使用阴影来缩放
窗体阴影颜色
阴影从里到外是逐渐变浅的,这个值设置深色部分的透明度,ARGB中的A值
阴影从里到外是逐渐变浅的,这个值设置浅色部分的透明度,ARGB中的A值
表示去掉自画的边框及标题栏后,剩下的可用的客户区区域,坐标相对于窗体左上角
表示去掉自画的边框及标题栏后,剩下的可用的客户区大小
表示MDI标签栏的区域,包括bottom-region
MGdUI皮肤
获取子窗体
通过sendmessage方式激活子窗体以避免闪烁
当子窗体关闭时激发
子窗体可视化变化
获取当前的子窗体列表
判断所接收到的 wm_nc-calc-size 消息是否指示窗体即将最小化
判断所接收到的 wm_nc-calc-size 消息是否指示窗体即将最大化
to make the client area to have 3D view
消息
画UI
在画背景时激发
重写该方法解决在VS设计器中,每次保存一个新的尺寸,再打开尺寸会变大的问题
创建控件时激发
窗体可见变化时激发
大小改变时激发
在位置变化时激发
窗体激活
窗体关闭后激发
加载时
在子窗体激活时激发
标签菜单
窗体上移动鼠标时激发
获取当前点击的标签项
在窗体上按下鼠标时激发
在窗体上放开鼠标时激发
在鼠标离开窗体时激发
Required designer variable.
Clean up any resources being used.
true if managed resources should be disposed; otherwise, false.
Required method for Designer support - do not modify
the contents of this method with the code editor.
Required designer variable.
Clean up any resources being used.
true if managed resources should be disposed; otherwise, false.
Required method for Designer support - do not modify
the contents of this method with the code editor.
该类处理mdi-bar的绘制及鼠标事件管理
use left,top,right to location the bar in owner form,
the margin is from Form.ClientRectangle
整个标签栏高度,包含标签栏底部区域、标签、标签顶部空隙
标签栏底部区域的高度
是否显示标签栏边框
是否显示标签栏背景
标签栏左内边距
标签栏右内边距
标签高度
激活的标签高度
tab顶部与bar顶部的空间,这个值用来计算 BarHeight
每个标签的左右边界可以不是垂直的,而是都有一个斜度
tab与tab之间的距离,用负值可以使tab有重叠的效果
标签是否显示图标
是否显示标签关闭按钮
标签图标大小
标签图标距离左边的距离
标签文字距离左边的距离
标签关闭按钮的大小
标签关闭按钮距离右边的距离
是否显示新建标签按钮
新建标签按钮的大小
新建标签距离左边的距离
按钮与Bar底部的距离
一个tab允许的最小宽度
一个tab允许的最大显示宽度
标签正常宽度
同步_listTabItems与mdi主窗体实际存在的子form
为每个tab分配空间,如果tab数目太多,则有些会被隐藏
重绘整个标签栏
处理鼠标事件。该方法会触发一些click事件,重刷一些按钮等
该类表示一个单独的标签项
该标签所对应的窗体
最终分配到的整个tab的宽度
表示所对应的form是否仍未被关闭
是否因空间不足而被隐藏
返回全部显示该标签文本所需的长度
返回显示全部文本时该tab所需的宽度,该宽度不超过bar-container
规定的tabmaxwidth
居左
显示在最后一个标签后面
该类封装设置一个主题所需的信息,可以继承该类实现不同的主题
主题名称,用于标识主题,对主题进行简单描述
窗体边界大小,鼠标移动到该边界将变成指针形状,拖动可改变窗体大小
窗体边框大小
窗体标题栏高度
标题栏图标与窗体左边框的距离
标题栏图标尺寸
标题栏文本左边距
控制按钮(关闭按钮)相对于窗体右上角的偏移量
窗体关闭按钮的尺寸
窗体最大化/还原按钮的大小
窗体最小化按钮的大小
关闭/最大化/最小化按钮之间的距离,可以设置成负值使它们重叠
窗体圆角程度
窗体圆角样式
是否使用默认的圆角样式,该样式为左上角和右上角圆角,
最好在窗体边框较粗时才使用该样式
是否在标题栏上绘制图标
是否在标题栏上绘制文本
是否显示窗体阴影
窗体阴影大小
拖动窗体阴影是否可以改变窗体大小
阴影的颜色,可以设置成其他颜色而不一定是黑色
阴影从里到外是逐渐变浅的,这个值设置深色部分的透明度,ARGB中的A值
阴影从里到外是逐渐变浅的,这个值设置浅色部分的透明度,ARGB中的A值
是否在客户区边界画线使其看起来有立体感
窗体标题栏文字是否居中显示
窗体边框最外一像素的颜色
窗体边框第二最外像素的颜色
窗体边框其他部分颜色,如果窗体边框大小大于2,则其他像素将用此颜色画出
标题栏颜色是从上到下渐变的,这个值设置上边的颜色值
标题栏颜色是从上到下渐变的,这个值设置下边的颜色值
标题栏文字颜色
窗体背景颜色,该值将覆盖窗体自带的BackColor属性值
窗体关闭按钮的颜色集合
窗体最大化/还原按钮的颜色集合
窗体最小化按钮的颜色集合
默认状态下关闭按钮背景图片
鼠标移过去时关闭按钮背景图片
鼠标按下时关闭按钮背景图片
默认状态下最大化按钮背景图片
鼠标移过去时最大化按钮背景图片
鼠标按下时最大化按钮背景图片
默认状态下恢复按钮背景图片
鼠标移过去时恢复按钮背景图片
鼠标按下时恢复按钮背景图片
默认状态下最小化按钮背景图片
鼠标移过去时最小化按钮背景图片
鼠标按下时最小化按钮背景图片
是否用SendMessage的方式切换子窗体,以避免子窗体切换时产生的闪烁
Mdi-Bar与窗体左、上、右边界的距离,只用到这三个值,Bottom值没用到。
用这三个值来确定Mdi-Bar的宽度及其在窗体中的位置
内部左边空白,第一个标签将从这个空白距离之后开始
标签栏内部右边空白
标签栏背景颜色
标签栏边框颜色
标签栏背景图片
是否显示标签栏边框
标签栏下边区域的背景颜色
标签栏下边区域的高度
标签高度
被选中的标签高度,可以设置成与TabHeight不一样的值,以突出显示被选中状态
标签之间的距离,设成负值可以使标签有重叠的效果
标签的最大宽度,任何情况下标签都不能超过这个宽度
标签正常宽度,如果标签需要很短的宽度(比如20像素)就可以显示完上面的文字,
但是Mdi-Bar上有足够的空间时,标签会以正常宽度(比如100像素)显示
标签最小宽度,当标签小于这个宽度时将被隐藏
标签梯度大小,标签可以不以矩形方式显示,而是有一个梯度/斜度。
标签顶部空白,这个值用于参与计算Mdi-Bar高度,计算方式为:
Mdi-Bar Height = BottomRegionHeight + TabHeight + TabTopSpace
标签上是否显示子窗体图标
标签上是否显示子窗体关闭图标
选中状态的标签的上部背景色,与下部背景色不同时,标签背景色就有渐变效果
选中状态的标签的下部背景色,与上部背景色不同时,标签背景色就有渐变效果
标签激活时字体颜色
非选中状态的标签的字体颜色
非选中状态的标签的上部背景色
非选中状态的标签的下部背景色
标签外边框颜色
标签内边框颜色,这个颜色一般具有一定的透明度
是否显示标签边框
是否显示默认的新建标签按钮(NewTabBtn)
NewTabBtn与下边框的距离,这个值用来定位按钮的Y坐标
新建标签按钮与左边框的距离,这个值用来定位按钮的X坐标
新建标签按钮大小
按钮颜色集合
是否一直显示ListAllBtn,即使在没有标签被隐藏的情况下
《显示全部标签》按钮的位置
《显示全部标签》按钮与下边框的距离,这个值用来定位按钮的Y坐标
《显示全部标签》按钮与左边框的距离,这个值用来定位按钮的X坐标
《显示全部标签》按钮的颜色
《显示全部标签》按钮的大小
皮肤主题
引发 ValueChanged 事件
引发 ThemeChanged 事件
指示鼠标位于哪个区域
控件Value值发生变化后引发
控件绘制MainLine前引发, 可以设置Cancel参数来取消默认的绘制
控件绘制Button前引发
引发 ValueChanged 事件
引发 BeforePaintMainLine 事件
引发 BeforePaintButton 事件
将Value值加一个LargeChange量
将Value值减一个LargeChange量
将Value值加一个SmallChange量
将Value值减一个SmallChange量
提供产生各种路径的静态方法,比如圆角路径、关闭按钮上的x路径、+号路径
圆角样式
无
所有
上
下
左
右
SimpleObject指的是只有一种状态(不像普通按钮一样有三种状态),并且其上的元素
布局比较简单的Object
DevExpress风格皮肤
DevExpress风格皮肤
新风格皮肤
新风格皮肤
基础皮肤
VS2013风格皮肤
this theme is just for chrome one quarter style
for diamond ring style only
Location of cursor hot spot returnet in WM_NCHITTEST.
On the screen background or on a dividing line between windows
(same as HTNOWHERE, except that the DefWindowProc function produces a system beep to indicate an error).
In a window currently covered by another window in the same thread
(the message will be sent to underlying windows in the same thread until one of them returns a code that is not HTTRANSPARENT).
On the screen background or on a dividing line between windows.
In a client area.
In a title bar.
In a window menu or in a Close button in a child window.
In a size box (same as HTSIZE).
In a menu.
In a horizontal scroll bar.
In the vertical scroll bar.
In a Minimize button.
In a Maximize button.
In the left border of a resizable window
(the user can click the mouse to resize the window horizontally).
In the right border of a resizable window
(the user can click the mouse to resize the window horizontally).
In the upper-horizontal border of a window.
In the upper-left corner of a window border.
In the upper-right corner of a window border.
In the lower-horizontal border of a resizable window
(the user can click the mouse to resize the window vertically).
In the lower-left corner of a border of a resizable window
(the user can click the mouse to resize the window diagonally).
In the lower-right corner of a border of a resizable window
(the user can click the mouse to resize the window diagonally).
In the border of a window that does not have a sizing border.
In a Close button.
In a Help button.
Contains the new coordinates of a window that has been moved or resized, that is, it is the proposed new window coordinates.
Contains the coordinates of the window before it was moved or resized.
Contains the coordinates of the window's client area before the window was moved or resized.
Pointer to a WINDOWPOS structure that contains the size and position values specified in the operation that moved or resized the window.
是否在这个按钮上按下了鼠标未释放
是否可见
画两次可以加深颜色
用于在click事件中传回数据
获取或设置是否将绘制完全限制在指定的区域内
线条图
作者: Kingthy
日期: 2007-09-11
MSN: Kingthy@gmail.com
转载请注明原作者,当你有更新修改时如果方便的希望能发一份给我.谢谢
画值
画布
X轴数据
走势图
作者: Kingthy
日期: 2007-09-11
MSN: Kingthy@gmail.com
转载请注明原作者,当你有更新修改时如果方便的希望能发一份给我.谢谢
初始化参数
返回或设置X轴间隔
标题
返回图片的宽度
返回或设置图片的高度
X轴的间距
Y轴的间距
标题的颜色
标题的字体
背景颜色
X轴的颜色
Y轴的颜色
返回X轴数据的最大值(供给Painter调用)
返回图片数据
画布
作图器
释放内容资源
获取X轴中的最大值
获取所有X轴列中的最大值
初始化图片
X轴的数据
画一条走势图
画多条走势图
作图器的基础类
作者: Kingthy
日期: 2007-09-11
MSN: Kingthy@gmail.com
转载请注明原作者,当你有更新修改时如果方便的希望能发一份给我.谢谢
返回此作图器的相关链走势图
获取某值在Y轴上的位置
当前点的值
点坐标
画XY轴线
画布
X轴的数据
画标题
画走势线
画布
X轴数据
方块图
作者: Kingthy
日期: 2007-09-11
MSN: Kingthy@gmail.com
转载请注明原作者,当你有更新修改时如果方便的希望能发一份给我.谢谢
画值
画布
X轴数据
走势图的X轴数据
作者: Kingthy
日期: 2007-09-11
MSN: Kingthy@gmail.com
转载请注明原作者,当你有更新修改时如果方便的希望能发一份给我.谢谢
标题
值
标题的颜色
标题的字体
值的颜色
值的字体
绘制颜色
值是否可见
克隆自身
定义X轴的数据集合
作者: Kingthy
日期: 2007-09-11
MSN: Kingthy@gmail.com
转载请注明原作者,当你有更新修改时如果方便的希望能发一份给我.谢谢
添加一批数据
轴的标题
添加一批数据
轴的标题
轴的值
重置轴的值
轴的值
克隆数据
Indicates the behavior of a key when a cell "on the edge" is being edited.
and the normal behavior of that key would exceed the edge. For example,
for a key that normally moves one column to the left, the "edge" would be
the left most column, since the normal action of the key cannot be taken
(since there are no more columns to the left).
按键将被忽略
按键将导致单元格编辑环绕到相对边缘的单元格。
按键将Wrap,但该列将更改为相应的相邻列。这只对正常操作为ChangeRow的键有意义。
按键将Wrap,但该行将更改为相应的相邻行。这只对正常操作为ChangeColumn的键有意义.
该键将导致当前编辑操作结束。
Indicates the normal behaviour of a key when used during a cell edit
operation.
The key press will be ignored
The key press will end the current edit and begin an edit
operation on the next editable cell to the left.
The key press will end the current edit and begin an edit
operation on the next editable cell to the right.
The key press will end the current edit and begin an edit
operation on the row above.
The key press will end the current edit and begin an edit
operation on the row below
The key press will cancel the current edit
The key press will finish the current edit operation
Custom verb that can be used for specialized actions.
Custom verb that can be used for specialized actions.
Custom verb that can be used for specialized actions.
Custom verb that can be used for specialized actions.
Custom verb that can be used for specialized actions.
Custom verb that can be used for specialized actions.
Custom verb that can be used for specialized actions.
Custom verb that can be used for specialized actions.
Custom verb that can be used for specialized actions.
Custom verb that can be used for specialized actions.
Instances of this class handle key presses during a cell edit operation.
设置给定键的行为
处理按键操作
True if the key was completely handled.
Gets or sets the ObjectListView on which the current key is being handled.
This cannot be null.
Gets the row of the cell that is currently being edited
Gets the index of the column of the cell that is being edited
Gets or sets the map that remembers the normal behaviour of keys
Gets or sets the map that remembers the desired behaviour of keys
on edge cases.
Setup the default key mapping
Handle the end edit command
Handle the cancel edit command
Placeholder that subclasses can override to handle any custom verbs
Handle a change row command
Handle a change column command
Start editing the indicated cell if that cell is not already being edited
The row to edit
The cell within that row to edit
Gets the adjacent item to the given item in the given direction.
If that item is disabled, continue in that direction until an enabled item is found.
The row whose neighbour is sought
The direction of the adjacentness
An OLVListView adjacent to the given item, or null if there are no more enabled items in that direction.
Gets the adjacent item to the given item in the given direction, wrapping if needed.
The row whose neighbour is sought
The direction of the adjacentness
An OLVListView adjacent to the given item, or null if there are no more items in that direction.
Gets a collection of columns that are editable in the order they are shown to the user
These items allow combo boxes to remember a value and its description.
Returns a string that represents the current object.
A string that represents the current object.
2
This editor shows and auto completes values from the given listview column.
Create an AutoCompleteCellEditor
This combo box is specialised to allow editing of an enum.
This editor simply shows and edits integer values.
Gets or sets the value shown by this editor
This editor simply shows and edits unsigned integer values.
This class can't be made public because unsigned int is not a
CLS-compliant type. If you want to use, just copy the code to this class
into your project and use it from there.
This editor simply shows and edits boolean values.
This editor simply shows and edits boolean values using a checkbox
Gets or sets the value shown by this editor
Gets or sets how the checkbox will be aligned
This editor simply shows and edits floating point values.
You can intercept the CellEditStarting event if you want
to change the characteristics of the editor. For example, by increasing
the number of decimal places.
Gets or sets the value shown by this editor
A delegate that creates an editor for the given value
The model from which that value came
The column for which the editor is being created
A representative value of the type to be edited. This value may not be the exact
value for the column/model combination. It could be simply representative of
the appropriate type of value.
A control which can edit the given value
An editor registry gives a way to decide what cell editor should be used to edit
the value of a cell. Programmers can register non-standard types and the control that
should be used to edit instances of that type.
All ObjectListViews share the same editor registry.
Create an EditorRegistry
Register that values of 'type' should be edited by instances of 'controlType'.
The type of value to be edited
The type of the Control that will edit values of 'type'
ObjectListView.EditorRegistry.Register(typeof(Color), typeof(MySpecialColorEditor));
Register the given delegate so that it is called to create editors
for values of the given type
The type of value to be edited
The delegate that will create a control that can edit values of 'type'
ObjectListView.EditorRegistry.Register(typeof(Color), CreateColorEditor);
...
public Control CreateColorEditor(Object model, OLVColumn column, Object value)
{
return new MySpecialColorEditor();
}
Register a delegate that will be called to create an editor for values
that have not been handled.
The delegate that will create a editor for all other types
Register a delegate that will be given a chance to create a control
before any other option is considered.
The delegate that will create a control
Remove the registered handler for the given type
Does nothing if the given type doesn't exist
The type whose registration is to be removed
Create and return an editor that is appropriate for the given value.
Return null if no appropriate editor can be found.
The model involved
The column to be edited
The value to be edited. This value may not be the exact
value for the column/model combination. It could be simply representative of
the appropriate type of value.
A Control that can edit the given type of values
Create and return an editor that will edit values of the given type
A enum type
A DataListView is a ListView that can be bound to a datasource (which would normally be a DataTable or DataView).
This listview keeps itself in sync with its source datatable by listening for change events.
The DataListView will automatically create columns to show all of the data source's columns/properties, if there is not already
a column showing that property. This allows you to define one or two columns in the designer and then have the others generated automatically.
If you don't want any column to be auto generated, set to false.
These generated columns will be only the simplest view of the world, and would look more interesting with a few delegates installed.
This listview will also automatically generate missing aspect getters to fetch the values from the data view.
Changing data sources is possible, but error prone. Before changing data sources, the programmer is responsible for modifying/resetting
the column collection to be valid for the new data source.
Internally, a CurrencyManager controls keeping the data source in-sync with other users of the data source (as per normal .NET
behavior). This means that the model objects in the DataListView are DataRowView objects. If you write your own AspectGetters/Setters,
they will be given DataRowView objects.
Make a DataListView
Gets or sets whether or not columns will be automatically generated to show the
columns when the DataSource is set.
This must be set before the DataSource is set. It has no effect afterwards.
Get or set the DataSource that will be displayed in this list view.
The DataSource should implement either , ,
or . Some common examples are the following types of objects:
When binding to a list container (i.e. one that implements the
interface, such as )
you must also set the property in order
to identify which particular list you would like to display. You
may also set the property even when
DataSource refers to a list, since can
also be used to navigate relations between lists.
When a DataSource is set, the control will create OLVColumns to show any
data source columns that are not already shown.
If the DataSource is changed, you will have to remove any previously
created columns, since they will be configured for the previous DataSource.
.
Gets or sets the name of the list or table in the data source for which the DataListView is displaying data.
If the data source is not a DataSet or DataViewManager, this property has no effect
Gets or sets the DataSourceAdaptor that does the bulk of the work needed
for data binding.
Adaptors cannot be shared between controls. Each DataListView needs its own adapter.
Add the given collection of model objects to this control.
A collection of model objects
This is a no-op for data lists, since the data
is controlled by the DataSource. Manipulate the data source
rather than this view of the data source.
Insert the given collection of objects before the given position
Where to insert the objects
The objects to be inserted
This is a no-op for data lists, since the data
is controlled by the DataSource. Manipulate the data source
rather than this view of the data source.
Remove the given collection of model objects from this control.
This is a no-op for data lists, since the data
is controlled by the DataSource. Manipulate the data source
rather than this view of the data source.
Change the Unfreeze behaviour
Handles parent binding context changes
Unused EventArgs.
A DataTreeListView is a TreeListView that calculates its hierarchy based on
information in the data source.
Like a , a DataTreeListView sources all its information
from a combination of and .
can be a DataTable, DataSet,
or anything that implements .
To function properly, the DataTreeListView requires:
- the table to have a column which holds a unique for the row. The name of this column must be set in .
- the table to have a column which holds id of the hierarchical parent of the row. The name of this column must be set in .
- a value which identifies which rows are the roots of the tree ().
The hierarchy structure is determined finding all the rows where the parent key is equal to . These rows
become the root objects of the hierarchy.
Like a TreeListView, the hierarchy must not contain cycles. Bad things will happen if the data is cyclic.
Gets or sets whether or not columns will be automatically generated to show the
columns when the DataSource is set.
This must be set before the DataSource is set. It has no effect afterwards.
Get or set the DataSource that will be displayed in this list view.
The DataSource should implement either , ,
or . Some common examples are the following types of objects:
When binding to a list container (i.e. one that implements the
interface, such as )
you must also set the property in order
to identify which particular list you would like to display. You
may also set the property even when
DataSource refers to a list, since can
also be used to navigate relations between lists.
Gets or sets the name of the list or table in the data source for which the DataListView is displaying data.
If the data source is not a DataSet or DataViewManager, this property has no effect
Gets or sets the name of the property/column that uniquely identifies each row.
The value contained by this column must be unique across all rows
in the data source. Odd and unpredictable things will happen if two
rows have the same id.
Null cannot be a valid key value.
Gets or sets the name of the property/column that contains the key of
the parent of a row.
The test condition for deciding if one row is the parent of another is functionally
equivilent to this:
Object.Equals(candidateParentRow[this.KeyAspectName], row[this.ParentKeyAspectName])
Unlike key value, parent keys can be null but a null parent key can only be used
to identify root objects.
Gets or sets the value that identifies a row as a root object.
When the ParentKey of a row equals the RootKeyValue, that row will
be treated as root of the TreeListView.
The test condition for deciding a root object is functionally
equivilent to this:
Object.Equals(candidateRow[this.ParentKeyAspectName], this.RootKeyValue)
The RootKeyValue can be null. Actually, it can be any value that can
be compared for equality against a basic type.
If this is set to the wrong value (i.e. to a value that no row
has in the parent id column), the list will be empty.
Gets or sets the value that identifies a row as a root object.
. The RootKeyValue can be of any type,
but the IDE cannot sensibly represent a value of any type,
so this is a typed wrapper around that property.
If you want the root value to be something other than a string,
you will have set it yourself.
Gets or sets whether or not the key columns (id and parent id) should
be shown to the user.
This must be set before the DataSource is set. It has no effect
afterwards.
Gets or sets the DataSourceAdaptor that does the bulk of the work needed
for data binding.
An IDragSource controls how drag out from the ObjectListView will behave
A drag operation is beginning. Return the data object that will be used
for data transfer. Return null to prevent the drag from starting. The data
object will normally include all the selected objects.
The returned object is later passed to the GetAllowedEffect() and EndDrag()
methods.
What ObjectListView is being dragged from.
Which mouse button is down?
What item was directly dragged by the user? There may be more than just this
item selected.
The data object that will be used for data transfer. This will often be a subclass
of DataObject, but does not need to be.
What operations are possible for this drag? This controls the icon shown during the drag
The data object returned by StartDrag()
A combination of DragDropEffects flags
The drag operation is complete. Do whatever is necessary to complete the action.
The data object returned by StartDrag()
The value returned from GetAllowedEffects()
A do-nothing implementation of IDragSource that can be safely subclassed.
See IDragSource documentation
See IDragSource documentation
See IDragSource documentation
A reasonable implementation of IDragSource that provides normal
drag source functionality. It creates a data object that supports
inter-application dragging of text and HTML representation of
the dragged rows. It can optionally force a refresh of all dragged
rows when the drag is complete.
Subclasses can override GetDataObject() to add new
data formats to the data transfer object.
Construct a SimpleDragSource
Construct a SimpleDragSource that refreshes the dragged rows when
the drag is complete
Gets or sets whether the dragged rows should be refreshed when the
drag operation is complete.
Create a DataObject when the user does a left mouse drag operation.
See IDragSource for further information.
Which operations are allowed in the operation? By default, all operations are supported.
All opertions are supported
The drag operation is finished. Refreshe the dragged rows if so configured.
Create a data object that will be used to as the data object
for the drag operation.
Subclasses can override this method add new formats to the data object.
The ObjectListView that is the source of the drag
A data object for the drag
Objects that implement this interface can acts as the receiver for drop
operation for an ObjectListView.
Gets or sets the ObjectListView that is the drop sink
Draw any feedback that is appropriate to the current drop state.
Any drawing is done over the top of the ListView. This operation should disturb
the Graphic as little as possible. Specifically, do not erase the area into which
you draw.
A Graphic for drawing
The contents bounds of the ListView (not including any header)
The user has released the drop over this control
Implementators should set args.Effect to the appropriate DragDropEffects. This value is returned
to the originator of the drag.
A drag has entered this control.
Implementators should set args.Effect to the appropriate DragDropEffects.
Change the cursor to reflect the current drag operation.
The drag has left the bounds of this control
The drag is moving over this control.
This is where any drop target should be calculated.
Implementators should set args.Effect to the appropriate DragDropEffects.
Should the drag be allowed to continue?
This is a do-nothing implementation of IDropSink that is a useful
base class for more sophisticated implementations.
Gets or sets the ObjectListView that is the drop sink
Draw any feedback that is appropriate to the current drop state.
Any drawing is done over the top of the ListView. This operation should disturb
the Graphic as little as possible. Specifically, do not erase the area into which
you draw.
A Graphic for drawing
The contents bounds of the ListView (not including any header)
The user has released the drop over this control
Implementators should set args.Effect to the appropriate DragDropEffects. This value is returned
to the originator of the drag.
A drag has entered this control.
Implementators should set args.Effect to the appropriate DragDropEffects.
The drag has left the bounds of this control
The drag is moving over this control.
This is where any drop target should be calculated.
Implementators should set args.Effect to the appropriate DragDropEffects.
Change the cursor to reflect the current drag operation.
You only need to override this if you want non-standard cursors.
The standard cursors are supplied automatically.
Should the drag be allowed to continue?
You only need to override this if you want the user to be able
to end the drop in some non-standard way, e.g. dragging to a
certain point even without releasing the mouse, or going outside
the bounds of the application.
This is called when the mouse leaves the drop region and after the
drop has completed.
The enum indicates which target has been found for a drop operation
No applicable target has been found
The list itself is the target of the drop
An item is the target
Between two items (or above the top item or below the bottom item)
can be the target. This is not actually ever a target, only a value indicate
that it is valid to drop between items
Above an item is the target
Below an item is the target
A subitem is the target of the drop
On the right of an item is the target (not currently used)
On the left of an item is the target (not currently used)
This class represents a simple implementation of a drop sink.
Actually, it should be called CleverDropSink -- it's far from simple and can do quite a lot in its own right.
Make a new drop sink
Get or set the locations where a drop is allowed to occur (OR-ed together)
Gets or sets whether this sink allows model objects to be dragged from other lists. Defaults to true.
Gets or sets whether the ObjectListView should scroll when the user drags
something near to the top or bottom rows. Defaults to true.
AutoScroll does not scroll horizontally.
Gets the billboard overlay that will be used to display feedback
messages during a drag operation.
Set this to null to stop the feedback.
Get or set whether a drop can occur between items of the list
Get or set whether a drop can occur on the listview itself
Get or set whether a drop can occur on items in the list
Get or set whether a drop can occur on a subitem in the list
Gets or sets whether the drop sink should draw feedback onto the given list
during the drag operation. Defaults to true.
If this is false, you will have to give the user feedback in some
other fashion, like cursor changes
Get or set the index of the item that is the target of the drop
Get the item that is the target of the drop
Get or set the location of the target of the drop
Get or set the index of the subitem that is the target of the drop
Get or set the color that will be used to provide drop feedback
Get whether the alt key was down during this drop event
Get whether any modifier key was down during this drop event
Get whether the control key was down during this drop event
Get whether the left mouse button was down during this drop event
Get whether the right mouse button was down during this drop event
Get whether the right mouse button was down during this drop event
Get whether the shift key was down during this drop event
Get or set the state of the keys during this drop event
Gets or sets whether the drop sink will automatically use cursors
based on the drop effect. By default, this is true. If this is
set to false, you must set the Cursor yourself.
Triggered when the sink needs to know if a drop can occur.
Handlers should set Effect to indicate what is possible.
Handlers can change any of the DropTarget* setttings to change
the target of the drop.
Triggered when the drop is made.
Triggered when the sink needs to know if a drop can occur
AND the source is an ObjectListView
Handlers should set Effect to indicate what is possible.
Handlers can change any of the DropTarget* setttings to change
the target of the drop.
Triggered when the drop is made.
AND the source is an ObjectListView
Cleanup the drop sink when the mouse has left the control or
the drag has finished.
Draw any feedback that is appropriate to the current drop state.
Any drawing is done over the top of the ListView. This operation should disturb
the Graphic as little as possible. Specifically, do not erase the area into which
you draw.
A Graphic for drawing
The contents bounds of the ListView (not including any header)
The user has released the drop over this control
A drag has entered this control.
Implementators should set args.Effect to the appropriate DragDropEffects.
Change the cursor to reflect the current drag operation.
The drag is moving over this control.
Trigger the Dropped events
Trigger CanDrop
Trigger Dropped
Trigger ModelCanDrop
Trigger ModelDropped
Handle the timer tick event, which is sent when the listview should
scroll
When the mouse is at the given point, what should the target of the drop be?
This method should update the DropTarget* members of the given arg block
The mouse point, in client co-ordinates
What sort of action is possible when the mouse is at the given point?
Based solely on the state of the modifier keys, what drop operation should
be used?
The drop operation that matches the state of the keys
Should the listview be made to scroll when the mouse is at the given point?
Update the state of our sink to reflect the information that
may have been written into the drop event args.
Draw the feedback that shows that the background is the target
Draw the feedback that shows that an item (or a subitem) is the target
DropTargetItem and DropTargetSubItemIndex tells what is the target
Draw the feedback that shows the drop will occur before target
Draw the feedback that shows the drop will occur after target
Return a GraphicPath that is round corner rectangle.
Calculate the target rectangle when the given item (and possible subitem)
is the target of the drop.
Draw a "between items" line at the given co-ordinates
This drop sink allows items within the same list to be rearranged,
as well as allowing items to be dropped from other lists.
This class can only be used on plain ObjectListViews and FastObjectListViews.
The other flavours have no way to implement the insert operation that is required.
This class does not work with grouping.
This class works when the OLV is sorted, but it is up to the programmer
to decide what rearranging such lists "means". Example: if the control is sorting
students by academic grade, and the user drags a "Fail" grade student up amonst the "A+"
students, it is the responsibility of the programmer to makes the appropriate changes
to the model and redraw/rebuild the control so that the users action makes sense.
Users of this class should listen for the CanDrop event to decide
if models from another OLV can be moved to OLV under this sink.
Create a RearrangingDropSink
Create a RearrangingDropSink
Trigger OnModelCanDrop
Trigger OnModelDropped
Do the work of processing the dropped items
When a drop sink needs to know if something can be dropped, or
to notify that a drop has occured, it uses an instance of this class.
Create a OlvDropEventArgs
Get the original drag-drop event args
Get the data object that is being dragged
Get the drop sink that originated this event
Get or set the index of the item that is the target of the drop
Get or set the location of the target of the drop
Get or set the index of the subitem that is the target of the drop
Get the item that is the target of the drop
Get or set the drag effect that should be used for this operation
Get or set if this event was handled. No further processing will be done for a handled event.
Get or set the feedback message for this operation
If this is not null, it will be displayed as a feedback message
during the drag.
Get the ObjectListView that is being dropped on
Get the location of the mouse (in target ListView co-ords)
Get the drop action indicated solely by the state of the modifier keys
These events are triggered when the drag source is an ObjectListView.
Create a ModelDropEventArgs
Gets the model objects that are being dragged.
Gets the ObjectListView that is the source of the dragged objects.
Get the model object that is being dropped upon.
This is only value for TargetLocation == Item
Refresh all the objects involved in the operation
A data transfer object that knows how to transform a list of model
objects into a text and HTML representation.
Create a data object from the selected objects in the given ObjectListView
The source of the data object
Create a data object which operates on the given model objects
in the given ObjectListView
The source of the data object
The model objects to be put into the data object
Gets or sets whether hidden columns will also be included in the text
and HTML representation. If this is false, only visible columns will
be included.
Gets or sets whether column headers will also be included in the text
and HTML representation.
Gets the ObjectListView that is being used as the source of the data
Gets the model objects that are to be placed in the data object
Put a text and HTML representation of our model objects
into the data object.
Create an exporter for the data contained in this object
Make a HTML representation of our model objects
Convert the fragment of HTML into the Clipboards HTML format.
The HTML format is found here http://msdn2.microsoft.com/en-us/library/aa767917.aspx
The HTML to put onto the clipboard. It must be valid HTML!
A string that can be put onto the clipboard and will be recognized as HTML
A FastDataListView virtualizes the display of data from a DataSource. It operates on
DataSets and DataTables in the same way as a DataListView, but does so much more efficiently.
A FastDataListView still has to load all its data from the DataSource. If you have SQL statement
that returns 1 million rows, all 1 million rows will still need to read from the database.
However, once the rows are loaded, the FastDataListView will only build rows as they are displayed.
获取或设置在设置DataSource时是否自动生成列以显示列。
必须在设置DataSource之前设置此设置。之后就没有效果了。
获取或设置将在此列表视图中显示的VirtualListDataSource。
VirtualListDataSource应实现 , ,
或 . 以下是一些常见的对象类型
绑定到列表容器时 (即,实现 接口, 比如 )
您还必须实现 属性,以便标识要显示的特定列表。您也可以设置 属性,
即使当VirtualListDataSource引用列表时也是如此, 因为 还可以用于导航列表之间的关系.
Gets or sets the name of the list or table in the data source for which the DataListView is displaying data.
If the data source is not a DataSet or DataViewManager, this property has no effect
Gets or sets the DataSourceAdaptor that does the bulk of the work needed
for data binding.
Create the DataSourceAdapter that this control will use.
A DataSourceAdapter configured for this list
Subclasses should override this to create their
own specialized adapters
Change the Unfreeze behaviour
A FastObjectListView trades function for speed.
On my mid-range laptop, this view builds a list of 10,000 objects in 0.1 seconds,
as opposed to a normal ObjectListView which takes 10-15 seconds. Lists of up to 50,000 items should be
able to be handled with sub-second response times even on low end machines.
A FastObjectListView is implemented as a virtual list with many of the virtual modes limits (e.g. no sorting)
fixed through coding. There are some functions that simply cannot be provided. Specifically, a FastObjectListView cannot:
- use Tile view
- show groups on XP
Make a FastObjectListView
Gets the collection of objects that survive any filtering that may be in place.
Get/set the collection of objects that this list will show
The contents of the control will be updated immediately after setting this property.
This method preserves selection, if possible. Use SetObjects() if
you do not want to preserve the selection. Preserving selection is the slowest part of this
code and performance is O(n) where n is the number of selected rows.
This method is not thread safe.
Move the given collection of objects to the given index.
This operation only makes sense on non-grouped ObjectListViews.
删除任何排序并恢复到模型对象的给定顺序
To be really honest, Unsort() doesn't work on FastObjectListViews since
the original ordering of model objects is lost when Sort() is called. So this method
effectively just turns off sorting.
为FastObjectListView提供数据源
This class isn't intended to be used directly, but it is left as a public
class just in case someone wants to subclass it.
Create a FastObjectListDataSource
Get n'th object
How many items are in the data source
Get the index of the given model
Remove the given collection of models from this source.
Update/replace the nth object with the given object
Apply the given filters to this data source. One or both may be null.
Gets the full list of objects being used for this fast list.
This list is unfiltered.
Gets the list of objects from ObjectList which survive any installed filters.
Rebuild the map that remembers which model object is displayed at which line
Build our filtered list from our full list.
Concrete implementation of the ICluster interface.
Create a cluster
The key for the cluster
Return a string representation of this cluster
Gets or sets how many items belong to this cluster
Gets or sets the label that will be shown to the user to represent
this cluster
Gets or sets the actual data object that all members of this cluster
have commonly returned.
Return an indication of the ordering between this object and the given one
This class provides a useful base implemention of a clustering
strategy where the clusters are grouped around the value of a given column.
This field is the text that will be shown to the user when a cluster
key is null. It is exposed so it can be localized.
This field is the text that will be shown to the user when a cluster
key is empty (i.e. a string of zero length). It is exposed so it can be localized.
Gets or sets the format that will be used by default for clusters that only
contain 1 item. The format string must accept two placeholders:
- {0} is the cluster key converted to a string
- {1} is the number of items in the cluster (always 1 in this case)
Gets or sets the format that will be used by default for clusters that
contain 0 or two or more items. The format string must accept two placeholders:
- {0} is the cluster key converted to a string
- {1} is the number of items in the cluster
Create a clustering strategy
Gets or sets the column upon which this strategy is operating
Gets or sets the format that will be used when the cluster
contains only 1 item. The format string must accept two placeholders:
- {0} is the cluster key converted to a string
- {1} is the number of items in the cluster (always 1 in this case)
If this is not set, the value from
ClusteringStrategy.DefaultDisplayLabelFormatSingular will be used
Gets or sets the format that will be used when the cluster
contains 0 or two or more items. The format string must accept two placeholders:
- {0} is the cluster key converted to a string
- {1} is the number of items in the cluster
If this is not set, the value from
ClusteringStrategy.DefaultDisplayLabelFormatPlural will be used
Get the cluster key by which the given model will be partitioned by this strategy
Create a cluster to hold the given cluster key
Gets the display label that the given cluster should use
Create a filter that will include only model objects that
match one or more of the given values.
Create a label that combines the string representation of the cluster
key with a format string that holds an "X [N items in cluster]" type layout.
This class calculates clusters from the groups that the column uses.
This is the default strategy for all non-date, filterable columns.
This class does not strictly mimic the groups created by the given column.
In particular, if the programmer changes the default grouping technique
by listening for grouping events, this class will not mimic that behaviour.
Get the cluster key by which the given model will be partitioned by this strategy
Gets the display label that the given cluster should use
This enum is used to indicate various portions of a datetime
Year
Month
Day of the month
Hour
Minute
Second
This class implements a strategy where the model objects are clustered
according to some portion of the datetime value in the configured column.
To create a strategy that grouped people who were born in
the same month, you would create a strategy that extracted just
the month, and formatted it to show just the month's name. Like this:
someColumn.ClusteringStrategy = new DateTimeClusteringStrategy(DateTimePortion.Month, "MMMM");
Create a strategy that clusters by month/year
Create a strategy that clusters around the given parts
Gets or sets the format string will will be used to create a user-presentable
version of the cluster key.
The format should use the date/time format strings, as documented
in the Windows SDK. Both standard formats and custom format will work.
"D" - long date pattern
"MMMM, yyyy" - "January, 1999"
Gets or sets the parts of the DateTime that will be extracted when
determining the clustering key for an object.
Get the cluster key by which the given model will be partitioned by this strategy
Gets the display label that the given cluster should use
Convert the given date into a user presentable string
Instances of this class know how to build a Filter menu.
It is responsible for clustering the values in the target column,
build a menu that shows those clusters, and then constructing
a filter that will enact the users choices.
Almost all of the methods in this class are declared as "virtual protected"
so that subclasses can provide alternative behaviours.
Gets or sets the string that labels the Apply button.
Exposed so it can be localized.
Gets or sets the string that labels the Clear All menu item.
Exposed so it can be localized.
Gets or sets the string that labels the Filtering menu as a whole..
Exposed so it can be localized.
Gets or sets the string that represents Select All values.
If this is set to null or empty, no Select All option will be included.
Exposed so it can be localized.
Gets or sets the image that will be placed next to the Clear Filtering menu item
Gets or sets the image that will be placed next to all "Apply" menu items on the filtering menu
Gets or sets whether null should be considered as a valid data value.
If this is true (the default), then a cluster will null as a key will be allow.
If this is false, object that return a cluster key of null will ignored.
Gets or sets the maximum number of objects that the clustering strategy
will consider. This should be large enough to collect all unique clusters,
but small enough to finish in a reasonable time.
The default value is 10,000. This should be perfectly
acceptable for almost all lists.
Create a Filter menu on the given tool tip for the given column in the given ObjectListView.
This is the main entry point into this class.
The strip that should be shown to the user
Create a collection of clusters that should be presented to the user
Order the given list of clusters in the manner in which they should be presented to the user.
Do the work of making a menu that shows the clusters to the users
Wrap a protected section around the real HandleItemChecked method, so that if
that method tries to change a "checkedness" of an item, we don't get a recursive
stack error. Effectively, this ensure that HandleItemChecked is only called
in response to a user action.
Handle a user-generated ItemCheck event
Handle any checking/unchecking of the Select All option, and keep
its checkedness in sync with everything else that is checked.
Clear all the filters that are applied to the given column
The column from which filters are to be removed
Apply the selected values from the given list as a filter on the given column
A list in which the checked items should be used as filters
The column for which a filter should be generated
Interface for model-by-model filtering
Should the given model be included when this filter is installed
The model object to consider
Returns true if the model will be included by the filter
Interface for whole list filtering
Return a subset of the given list of model objects as the new
contents of the ObjectListView
The collection of model objects that the list will possibly display
The filtered collection that holds the model objects that will be displayed.
Base class for model-by-model filters
Should the given model be included when this filter is installed
The model object to consider
Returns true if the model will be included by the filter
This filter calls a given Predicate to decide if a model object should be included
Create a filter based on the given predicate
The function that will filter objects
Gets or sets the predicate used to filter model objects
Should the given model object be included?
A CompositeFilter joins several other filters together.
If there are no filters, all model objects are included
Create an empty filter
Create a composite filter from the given list of filters
A list of filters
Gets or sets the filters used by this composite
Get the sub filters that are text match filters
Decide whether or not the given model should be included by the filter
True if the object is included by the filter
Decide whether or not the given model should be included by the filter
Filters is guaranteed to be non-empty when this method is called
The model object under consideration
True if the object is included by the filter
A CompositeAllFilter joins several other filters together.
A model object must satisfy all filters to be included.
If there are no filters, all model objects are included
Create a filter
Decide whether or not the given model should be included by the filter
Filters is guaranteed to be non-empty when this method is called
The model object under consideration
True if the object is included by the filter
A CompositeAllFilter joins several other filters together.
A model object must only satisfy one of the filters to be included.
If there are no filters, all model objects are included
Create a filter from the given filters
Decide whether or not the given model should be included by the filter
Filters is guaranteed to be non-empty when this method is called
The model object under consideration
True if the object is included by the filter
Instances of this class extract a value from the model object
and compare that value to a list of fixed values. The model
object is included if the extracted value is in the list
If there is no delegate installed or there are
no values to match, no model objects will be matched
Create a filter that will use the given delegate to extract values
Create a filter that will extract values using the given delegate
and compare them to the values in the given list.
Gets or sets the delegate that will be used to extract values
from model objects
Gets or sets the list of values that the value extracted from
the model object must match in order to be included.
Should the given model object be included?
Decides if the given property is a match for the values in the PossibleValues collection
Instances of this class match a property of a model objects against
a list of bit flags. The property should be an xor-ed collection
of bits flags.
Both the property compared and the list of possible values
must be convertible to ulongs.
Create an instance
Gets or sets the collection of values that will be matched.
These must be ulongs (or convertible to ulongs).
Decides if the given property is a match for the values in the PossibleValues collection
Base class for whole list filters
Return a subset of the given list of model objects as the new
contents of the ObjectListView
The collection of model objects that the list will possibly display
The filtered collection that holds the model objects that will be displayed.
Instance of this class implement delegate based whole list filtering
A delegate that filters on a whole list
Create a ListFilter
Gets or sets the delegate that will filter the list
Do the actual work of filtering
Filter the list so only the last N entries are displayed
Create a no-op tail filter
Create a filter that includes on the last N model objects
Gets or sets the number of model objects that will be
returned from the tail of the list
Return the last N subset of the model objects
Instances of this class cluster model objects on the basis of a
property that holds an xor-ed collection of bit flags.
Create a clustering strategy that operates on the flags of the given enum
Create a clustering strategy around the given collections of flags and their display labels.
There must be the same number of elements in both collections.
The list of flags.
Gets the value that will be xor-ed to test for the presence of a particular value.
Gets the labels that will be used when the corresponding Value is XOR present in the data.
Get the cluster key by which the given model will be partitioned by this strategy
Gets the display label that the given cluster should use
Create a filter that will include only model objects that
match one or more of the given values.
A cluster is a like collection of objects that can be usefully filtered
as whole using the filtering UI provided by the ObjectListView.
Gets or sets how many items belong to this cluster
Gets or sets the label that will be shown to the user to represent
this cluster
Gets or sets the actual data object that all members of this cluster
have commonly returned.
Implementation of this interface control the selecting of cluster keys
and how those clusters will be presented to the user
Gets or sets the column upon which this strategy will operate
Get the cluster key by which the given model will be partitioned by this strategy
If the returned value is an IEnumerable, the given model is considered
to belong to multiple clusters
Create a cluster to hold the given cluster key
Gets the display label that the given cluster should use
Create a filter that will include only model objects that
match one or more of the given values.
Instances of this class include only those rows of the listview
that match one or more given strings.
This class can match strings by prefix, regex, or simple containment.
There are factory methods for each of these matching strategies.
Create a text filter that will include rows where any cell matches
any of the given regex expressions.
Any string that is not a valid regex expression will be ignored.
Create a text filter that includes rows where any cell begins with one of the given strings
Create a text filter that includes rows where any cell contains any of the given strings.
Create a TextFilter
Create a TextFilter that finds the given string
Create a TextFilter that finds the given string using the given comparison
Gets or sets which columns will be used for the comparisons? If this is null, all columns will be used
Gets or sets additional columns which will be used in the comparison. These will be used
in addition to either the Columns property or to all columns taken from the control.
Gets or sets the collection of strings that will be used for
contains matching. Setting this replaces all previous texts
of any kind.
Gets whether or not this filter has any search criteria
Gets or set the ObjectListView upon which this filter will work
You cannot really rebase a filter after it is created, so do not change this value.
It is included so that it can be set in an object initializer.
Gets or sets the collection of strings that will be used for
prefix matching. Setting this replaces all previous texts
of any kind.
Gets or sets the options that will be used when compiling the regular expression.
This is only used when doing Regex matching (obviously).
If this is not set specifically, the appropriate options are chosen to match the
StringComparison setting (culture invariant, case sensitive).
Gets or sets the collection of strings that will be used for
regex pattern matching. Setting this replaces all previous texts
of any kind.
Gets or sets how the filter will match text
Loop over the columns that are being considering by the filter
Do the actual work of filtering
Find all the ways in which this filter matches the given string.
This is used by the renderer to decide which bits of
the string should be highlighted
A list of character ranges indicating the matched substrings
Is the given column one of the columns being used by this filter?
Base class for the various types of string matching that TextMatchFilter provides
Gets how the filter will match text
Gets the text filter to which this component belongs
Gets or sets the text that will be matched
Find all the ways in which this filter matches the given string.
This is used by the renderer to decide which bits of
the string should be highlighted.
this.Text will not be null or empty when this is called.
The text of the cell we want to search
A list of character ranges indicating the matched substrings
Does the given text match the filter
this.Text will not be null or empty when this is called.
The text of the cell we want to search
Return true if the given cellText matches our strategy
This component provides text contains matching strategy.
Create a text contains strategy
Does the given text match the filter
this.Text will not be null or empty when this is called.
The text of the cell we want to search
Return true if the given cellText matches our strategy
Find all the ways in which this filter matches the given string.
This is used by the renderer to decide which bits of
the string should be highlighted.
this.Text will not be null or empty when this is called.
The text of the cell we want to search
A list of character ranges indicating the matched substrings
This component provides text begins with matching strategy.
Create a text begins strategy
Does the given text match the filter
this.Text will not be null or empty when this is called.
The text of the cell we want to search
Return true if the given cellText matches our strategy
Find all the ways in which this filter matches the given string.
This is used by the renderer to decide which bits of
the string should be highlighted.
this.Text will not be null or empty when this is called.
The text of the cell we want to search
A list of character ranges indicating the matched substrings
This component provides regex matching strategy.
Creates a regex strategy
Gets or sets the options that will be used when compiling the regular expression.
Gets or sets a compilex regular expression, based on our current Text and RegexOptions.
If Text fails to compile as a regular expression, this will return a Regex object
that will match all strings.
Gets whether or not our current regular expression is a valid regex
Does the given text match the filter
this.Text will not be null or empty when this is called.
The text of the cell we want to search
Return true if the given cellText matches our strategy
Find all the ways in which this filter matches the given string.
This is used by the renderer to decide which bits of
the string should be highlighted.
this.Text will not be null or empty when this is called.
The text of the cell we want to search
A list of character ranges indicating the matched substrings
This attribute is used to mark a property of a model
class that should be noticed by Generator class.
All the attributes of this class match their equivilent properties on OLVColumn.
Create a new OLVColumnAttribute
Create a new OLVColumnAttribute with the given title
The title of the column
An array of IComparables that mark the cutoff points for values when
grouping on this column.
Properties marked with [OLVChildren] will be used as the children source in a TreeListView.
Properties marked with [OLVIgnore] will not have columns generated for them.
ColumnComparer is the workhorse for all comparison between two values of a particular column.
If the column has a specific comparer, use that to compare the values. Otherwise, do
a case insensitive string compare of the string representations of the values.
This class inherits from both IComparer and its generic counterpart
so that it can be used on untyped and typed collections.
This is used by normal (non-virtual) ObjectListViews. Virtual lists use
ModelObjectComparer
Gets or sets the method that will be used to compare two strings.
The default is to compare on the current culture, case-insensitive
Create a ColumnComparer that will order the rows in a list view according
to the values in a given column
The column whose values will be compared
The ordering for column values
Create a ColumnComparer that will order the rows in a list view according
to the values in a given column, and by a secondary column if the primary
column is equal.
The column whose values will be compared
The ordering for column values
The column whose values will be compared for secondary sorting
The ordering for secondary column values
Compare two rows
row1
row2
An ordering indication: -1, 0, 1
Compare two rows
row1
row2
An ordering indication: -1, 0, 1
Compare the actual values to be used for sorting
The aspect extracted from the first row
The aspect extracted from the second row
An ordering indication: -1, 0, 1
This comparer sort list view groups. OLVGroups have a "SortValue" property,
which is used if present. Otherwise, the titles of the groups will be compared.
Create a group comparer
The ordering for column values
Compare the two groups. OLVGroups have a "SortValue" property,
which is used if present. Otherwise, the titles of the groups will be compared.
group1
group2
An ordering indication: -1, 0, 1
This comparer can be used to sort a collection of model objects by a given column
This is used by virtual ObjectListViews. Non-virtual lists use
ColumnComparer
Gets or sets the method that will be used to compare two strings.
The default is to compare on the current culture, case-insensitive
Create a model object comparer
Create a model object comparer with a secondary sorting column
Compare the two model objects
Compare the actual values
A helper class that translates DataSource events for an ObjectListView
Make a DataSourceAdapter
Finalize this object
Release all the resources used by this instance
Release all the resources used by this instance
Gets or sets whether or not columns will be automatically generated to show the
columns when the DataSource is set.
This must be set before the DataSource is set. It has no effect afterwards.
Get or set the DataSource that will be displayed in this list view.
Gets or sets the name of the list or table in the data source for which the DataListView is displaying data.
If the data source is not a DataSet or DataViewManager, this property has no effect
Gets the ObjectListView upon which this adaptor will operate
Gets or sets the currency manager which is handling our binding context
Our data source has changed. Figure out how to handle the new source
Our data source has changed. Figure out how to handle the new source
The data source for this control has changed. Reconfigure the control for the new source
Take the contents of the currently bound list and put them into the control
Create columns for the listview based on what properties are available in the data source
This method will create columns if there is not already a column displaying that property.
Decide if a new column should be added to the control to display
the given property
Configure the given column to show the given property.
The title and aspect name of the column are already filled in.
Generate aspect getters and putters for any columns that are missing them (and for which we have
enough information to actually generate a getter)
CurrencyManager ListChanged event handler.
Deals with fine-grained changes to list items.
It's actually difficult to deal with these changes in a fine-grained manner.
If our listview is grouped, then any change may make a new group appear or
an old group disappear. It is rarely enough to simply update the affected row.
Handle PropertyDescriptor* events
Handle ItemMoved event
Handle the ItemDeleted event
Handle an ItemAdded event.
Handle the Reset event
Handle ItemChanged event. This is triggered when a single item
has changed, so just refresh that one item.
Even in this simple case, we should probably rebuild the list.
For example, the change could put the item into its own new group.
The CurrencyManager calls this if the data source looks
different. We just reload everything.
CHECK: Do we need this if we are handle ListChanged metadata events?
Called by the CurrencyManager when the currently selected item
changes. We update the ListView selection so that we stay in sync
with any other controls bound to the same source.
Change the control's position (which is it's currently selected row)
to the nth row in the dataset
The index of the row to be selected
Handle the selection changing in our ListView.
We need to tell our currency manager about the new position.
Handle the frozenness of our ListView changing.
Handle a change to the BindingContext of our ListView.
These delegates are used to extract an aspect from a row object
These delegates are used to put a changed value back into a model object
These delegates can be used to convert an aspect value to a display string,
instead of using the default ToString()
These delegates are used to get the tooltip for a cell
These delegates are used to the state of the checkbox for a row object.
For reasons known only to someone in Microsoft, we can only set
a boolean on the ListViewItem to indicate it's "checked-ness", but when
we receive update events, we have to use a tristate CheckState. So we can
be told about an indeterminate state, but we can't set it ourselves.
As of version 2.0, we can now return indeterminate state.
These delegates are used to get the state of the checkbox for a row object.
These delegates are used to put a changed check state back into a model object
These delegates are used to put a changed check state back into a model object
These delegates are used to get the renderer for a particular cell
The callbacks for RightColumnClick events
This delegate will be used to own draw header column.
This delegate is called when a group has been created but not yet made
into a real ListViewGroup. The user can take this opportunity to fill
in lots of other details about the group.
These delegates are used to retrieve the object that is the key of the group to which the given row belongs.
These delegates are used to convert a group key into a title for the group
These delegates are used to get the tooltip for a column header
These delegates are used to fetch the image selector that should be used
to choose an image for this column.
These delegates are used to draw a cell
These delegates are used to fetch a row object for virtual lists
These delegates are used to format a listviewitem before it is added to the control.
These delegates can be used to return the array of texts that should be searched for text filtering
These delegates are used to sort the listview in some custom fashion
These delegates are used to order two strings.
x cannot be null. y can be null.
An ObjectListView is a much easier to use, and much more powerful, version of the ListView.
An ObjectListView automatically populates a ListView control with information taken
from a given collection of objects. It can do this because each column is configured
to know which bit of the model object (the "aspect") it should be displaying. Columns similarly
understand how to sort the list based on their aspect, and how to construct groups
using their aspect.
Aspects are extracted by giving the name of a method to be called or a
property to be fetched. These names can be simple names or they can be dotted
to chain property access e.g. "Owner.Address.Postcode".
Aspects can also be extracted by installing a delegate.
An ObjectListView can show a "this list is empty" message when there is nothing to show in the list,
so that the user knows the control is supposed to be empty.
Right clicking on a column header should present a menu which can contain:
commands (sort, group, ungroup); filtering; and column selection. Whether these
parts of the menu appear is controlled by ShowCommandMenuOnRightClick,
ShowFilterMenuOnRightClick and SelectColumnsOnRightClick respectively.
The groups created by an ObjectListView can be configured to include other formatting
information, including a group icon, subtitle and task button. Using some undocumented
interfaces, these groups can even on virtual lists.
ObjectListView supports dragging rows to other places, including other application.
Special support is provide for drops from other ObjectListViews in the same application.
In many cases, an ObjectListView becomes a full drag source by setting to
true. Similarly, to accept drops, it is usually enough to set to true,
and then handle the and events (or the and
events, if you only want to handle drops from other ObjectListViews in your application).
For these classes to build correctly, the project must have references to these assemblies:
- System
- System.Data
- System.Design
- System.Drawing
- System.Windows.Forms (obviously)
How does a user indicate that they want to edit cells?
列表将不支持编辑(同时F2按键无效)
单击 单元格 将编辑值.
选择该行,就像正常选择行一样。用户必须按F2键才能编辑主列。
双击子项或主列将编辑该单元格。
F2键将编辑主列。
按F2键是编辑单元格的唯一方法。一旦主列被编辑,
行中的其他单元格可以通过按Tab键进行编辑。
只需单击任意单元格即可编辑值,即使是主列也是如此。
这些值指定向用户显示列选择的方式
不会显示任何列选择
这些列将显示在主菜单中
这些列将显示在子菜单中
将显示一个模式对话框,允许用户选择列
Triggered after a ObjectListView has been searched by the user typing into the list
Triggered after a ObjectListView has been sorted
Triggered before a ObjectListView is searched by the user typing into the list
Set Cancelled to true to prevent the searching from taking place.
Changing StringToFind or StartSearchFrom will change the subsequent search.
Triggered before a ObjectListView is sorted
Set Cancelled to true to prevent the sort from taking place.
Changing ColumnToSort or SortOrder will change the subsequent sort.
Triggered after a ObjectListView has created groups
Triggered before a ObjectListView begins to create groups
Set Groups to prevent the default group creation process
Triggered just before a ObjectListView creates groups
You can make changes to the groups, which have been created, before those
groups are created within the listview.
Triggered when a button in a cell is left clicked.
This event is triggered when the user moves a drag over an ObjectListView that
has a SimpleDropSink installed as the drop handler.
Handlers for this event should set the Effect argument and optionally the
InfoMsg property. They can also change any of the DropTarget* setttings to change
the target of the drop.
Triggered when a cell has finished being edited.
Triggered when a cell is about to finish being edited.
If Cancel is already true, the user is cancelling the edit operation.
Set Cancel to true to prevent the value from the cell being written into the model.
You cannot prevent the editing from finishing within this event -- you need
the CellEditValidating event for that.
Triggered when a cell is about to be edited.
Set Cancel to true to prevent the cell being edited.
You can change the the Control to be something completely different.
Triggered when a cell editor needs to be validated
If this event is cancelled, focus will remain on the cell editor.
Triggered when a cell is left clicked.
Triggered when the mouse is above a cell.
Triggered when a cell is right clicked.
This event is triggered when a cell needs a tool tip.
This event is triggered when a checkbox is checked/unchecked on a subitem
Triggered when a column header is right clicked.
This event is triggered when the user releases a drag over an ObjectListView that
has a SimpleDropSink installed as the drop handler.
This event is triggered when the control needs to filter its collection of objects.
This event is triggered when a cell needs to be formatted.
This event is triggered when the frozeness of the control changes.
This event is triggered when a row needs to be formatted.
This event is triggered when a group is about to collapse or expand.
This can be cancelled to prevent the expansion.
This event is triggered when a group changes state.
This event is triggered when a header checkbox is changing value
This event is triggered when a header needs a tool tip.
Triggered when the "hot" item changes
Triggered when a hyperlink cell is clicked.
Triggered when the task text of a group is clicked.
Is the value in the given cell a hyperlink.
Some new objects are about to be added to an ObjectListView.
The contents of the ObjectListView has changed.
The contents of the ObjectListView is about to change via a SetObjects call
Set Cancelled to true to prevent the contents of the list changing. This does not work with virtual lists.
Some objects are about to be removed from an ObjectListView.
This event is triggered when the user moves a drag over an ObjectListView that
has a SimpleDropSink installed as the drop handler, and when the source control
for the drag was an ObjectListView.
Handlers for this event should set the Effect argument and optionally the
InfoMsg property. They can also change any of the DropTarget* setttings to change
the target of the drop.
This event is triggered when the user releases a drag over an ObjectListView that
has a SimpleDropSink installed as the drop handler and when the source control
for the drag was an ObjectListView.
This event is triggered once per user action that changes the selection state
of one or more rows.
This event is triggered when the contents of the ObjectListView has scrolled.
Tell the world when a cell is about to be edited.
Tell the world when a cell is about to finish being edited.
Tell the world when a cell is about to finish being edited.
Tell the world when a cell has finished being edited.
创建一个 ObjectListView
Dispose of any resources this instance has been using
获取鼠标左键是否在此时按下。
获取该程序是否在Vista或更高版本上运行
获取该程序是否在Win7或更高版本上运行
Gets or sets how what smoothing mode will be applied to graphic operations.
Gets or sets how should text be renderered.
获取或设置当组Key为Null时将用于标题组的字符串。将其公开以使其可以本地化。
Convert the given enumerable into an ArrayList as efficiently as possible
The source collection
If true, this method will always create a new
collection.
An ArrayList with the same contents as the given collection.
When we move to .NET 3.5, we can use LINQ and not need this method.
Return the count of items in the given enumerable
When we move to .NET 3.5, we can use LINQ and not need this method.
Return whether or not the given enumerable is empty. A string is regarded as
an empty collection.
True if the given collection is null or empty
When we move to .NET 3.5, we can use LINQ and not need this method.
Gets or sets whether all ObjectListViews will silently ignore missing aspect errors.
By default, if an ObjectListView is asked to display an aspect
(i.e. a field/property/method)
that does not exist from a model, it displays an error message in that cell, since that
condition is normally a programming error. There are some use cases where
this is not an error -- in those cases, set this to true and ObjectListView will
simply display an empty cell.
Be warned: if you set this to true, it can be very difficult to track down
typing mistakes or name changes in AspectNames.
Gets or sets whether the control will draw a rectangle in each cell showing the cell padding.
This can help with debugging display problems from cell padding.
As with all cell padding, this setting only takes effect when the control is owner drawn.
Gets the style that will be used by default to format disabled rows
Gets the style that will be used by default to format hot rows
Gets or sets an model filter that is combined with any column filtering that the end-user specifies.
This is different from the ModelFilter property, since setting that will replace
any column filtering, whereas setting this will combine this filter with the column filtering
Get or set all the columns that this control knows about.
Only those columns where IsVisible is true will be seen by the user.
If you want to add new columns programmatically, add them to
AllColumns and then call RebuildColumns(). Normally, you do not have to
deal with this property directly. Just use the IDE.
If you do add or remove columns from the AllColumns collection,
you have to call RebuildColumns() to make those changes take effect.
获取或设置每隔一行的背景色
获取已设置的交替行背景色或默认颜色
此属性强制ObjectListView始终按给定列对项进行分组。
如果AlwaysGroupByColumn不为空,则此属性将用于确定如何对这些组进行排序。
如果此属性的值为SortOrder.None,则排序顺序将根据用户上次单击的标题切换。
Give access to the image list that is actually being used by the control
Normally, it is preferable to use SmallImageList. Only use this property
if you know exactly what you are doing.
获取或设置编辑单元格的方式
Columns can also be marked as editable.
编辑单元格时,是否应该使用整个单元格(减去复选框或图像使用的任何空间)?
默认值为 true.
This is always treated as true when the control is NOT owner drawn.
When this is false and the control is owner drawn,
ObjectListView will try to calculate the width of the cell's
actual contents, and then size the editing control to be just the right width. If this is true,
the whole width of the cell will be used, regardless of the cell's contents.
Each column can have a different value for property. This value from the control is only
used when a column is not specified one way or another.
Regardless of this setting, developers can specify the exact size of the editing control
by listening for the CellEditStarting event.
Gets or sets the engine that will handle key presses during a cell edit operation.
Settings this to null will reset it to default value.
获取当前用于编辑单元格的控件。
This will obviously be null if no cell is being edited.
获取或设置编辑控件左边缘或右边缘的单元格时Tab键的行为。
如果为False(默认值),则按Tab键将换行到同一行的另一侧。
如果为True,编辑最右边的单元格时按Tab键将前进到下一行,
编辑最左边的单元格时按Shift-Tab组合键将更改为上一行。
获取或设置编辑单元格时Enter键的行为。
如果为False(默认值),则按Enter键将简单地完成编辑操作。
如果为True,则Enter将完成编辑操作,并在当前单元格下方的单元格上启动新的编辑操作,在位于底部单元格时换行到下一行的顶部。
获取显示单元格提示的工具提示控件
获取或设置该项的每个单元格周围将留空的像素数。单元格内容在考虑填充后对齐。
Each value of the given rectangle will be treated as an inset from
the corresponding side. The width of the rectangle is the padding for the
right cell edge. The height of the rectangle is the padding for the bottom
cell edge.
So, this.olv1.CellPadding = new Rectangle(1, 2, 3, 4); will leave one pixel
of space to the left of the cell, 2 pixels at the top, 3 pixels of space
on the right edge, and 4 pixels of space at the bottom of each cell.
This setting only takes effect when the control is owner drawn.
This setting only affects the contents of the cell. The background is
not affected.
If you set this to a foolish value, your control will appear to be empty.
获取或设置默认情况下单元格垂直对齐的方式。
This setting only takes effect when the control is owner drawn. It will only be noticable
when RowHeight has been set such that there is some vertical space in each row.
Should this list show checkboxes?
返回选中行的模型对象;如果未选中行或选中多行,则返回NULL
Get or set the collection of model objects that are checked.
When setting this property, any row whose model object isn't
in the given collection will be unchecked. Setting to null is
equivilent to unchecking all.
This property returns a simple collection. Changes made to the returned
collection do NOT affect the list. This is different to the behaviour of
CheckedIndicies collection.
.NET's CheckedItems property is not helpful. It is just a short-hand for
iterating through the list looking for items that are checked.
The performance of the get method is O(n), where n is the number of items
in the control. The performance of the set method is
O(n + m) where m is the number of objects being checked. Be careful on long lists.
获取或设置可枚举对象中的选中对象。
Useful for checking all objects in the list.
this.olv1.CheckedObjectsEnumerable = this.olv1.Objects;
Gets Columns for this list. We hide the original so we can associate
a specialised editor with it.
获取/设置当列表切换到TileView(平铺视图)时应使用的列的列表。
按向用户显示的顺序返回可见列
获取显示列表的控件区域,减去任何标题控件
获取或设置当用户按Ctrl+C组合键时是否应将选定行复制到剪贴板
获取或设置按Ctrl+C键复制到剪贴板功能是否应使用安装的DragSource创建放置到剪贴板上的数据对象。
This is normally what is desired, unless a custom DragSource is installed
that does some very specialized drag-drop behaviour.
Gets the list of decorations that will be drawn the ListView
Do not modify the contents of this list directly. Use the AddDecoration() and RemoveDecoration() methods.
A decoration scrolls with the list contents. An overlay is fixed in place.
所有者绘制时,此渲染器将绘制未指定特定渲染器的列
如果尝试将其设置为NULL,则它将恢复为HighlightTextRenende
获取用于绘制给定单元格的渲染器。
The row model for the row
The column to be drawn
The renderer used for drawing a cell. Must not return null.
获取或设置将应用于禁用项的样式。
If this is not set explicitly, will be used.
获取或设置已禁用的模型对象的列表。无法选择或激活已禁用的对象。
判断此给定模型对象是否已禁用
禁用给定的模型对象。禁用的对象无法选择或激活。
Must not be null
禁用所有给定的模型对象
启用给定的模型对象,以便可以再次选择并激活它。
Must not be null
启用所有给定的模型对象
忽略所有禁用的对象。这不会触发重绘或重建
Gets or sets the object that controls how drags start from this control
Gets or sets the object that controls how drops are accepted and processed
by this ListView.
If the given sink is an instance of SimpleDropSink, then events from the drop sink
will be automatically forwarded to the ObjectListView (which means that handlers
for those event can be configured within the IDE).
If this is set to null, the control will not accept drops.
This registry decides what control should be used to edit what cells, based
on the type of the value in the cell.
All instances of ObjectListView share the same editor registry.
获取或设置在此列表视图中没有项时应显示的文本。
If the EmptyListMsgOverlay has been changed to something other than a TextOverlay,
this property does nothing
获取或设置绘制列表空消息时应使用的字体
If the EmptyListMsgOverlay has been changed to something other than a TextOverlay,
this property does nothing
返回“列表为空”消息的字体或合理的默认值
Gets or sets the overlay responsible for drawing the List Empty msg.
获取在筛选中幸存下来的对象的集合。
This collection is the result of filtering the current list of objects.
It is not a snapshot of the filtered list that was last used to build the control.
Normal warnings apply when using this with virtual lists. It will work, but it
may take a while.
获取或设置将用于生成筛选器菜单的策略对象
如果为NULL,则不会生成筛选器菜单。
获取或设置具有键盘焦点的行
Setting an object to be focused does *not* select it. If you want to select and focus a row,
use .
This property is not generally used and is only useful in specialized situations.
隐藏Groups集合,使其在“属性”网格中不可见。
获取或设置分组使用的ImageList
如果未设置此选项,则分组标题将不会显示任何图像。
获取在组为空或包含多个项目时应如何设置组标签的格式
给定的格式字符串必须有两个占位符:
- {0} - 原来的组标题
- {1} - 组中的项目数
"[{0} [{1} 项]"
返回this.GroupWithItemCountFormat或合理的默认值
获取在组仅包含单个项目时应如何设置组标签的格式
给定的格式字符串必须有两个占位符:
- {0} - 原来的组标题
- {1} - 组中的项目数 (总是1)
"[{0} [{1} 项]"
获取GroupWithItemCountSingularFormat或合理的默认值
获取或设置此ObjectListView中的组是否应可折叠。
此特性只支持Vista或之后的系统.
获取当前列表是否存在当列表为空时显示的文本
获取是否有要绘制的叠加层
获取ListView的列头控件
获取或设置列标题文本的绘制字体
单个列可以通过其HeaderFormatStyle属性重写此设置。
获取或设置将用于绘制列表视图的列标题的样式
仅当HeaderUsesThemes为false时才使用此选项。
单个列可以通过其HeaderFormatStyle属性重写此设置。
获取或设置标题的最大高度。-1表示没有最大值。
获取或设置标题的最小高度。-1表示没有最小值。
获取或设置是否严格按照操作系统的主题绘制标题。
如果设置为true,则列头将完全由系统呈现,不需要ObjectListViews的任何特殊处理。
页眉中将没有图像、没有过滤器指示符、没有文字换行、没有页眉样式、没有复选框。
如果将其设置为False,ObjectListView将以其认为最好的方式呈现标题。
如果不需要特殊功能,则ObjectListView会将渲染委托给操作系统。
否则,ObjectListView将根据配置设置绘制标题。
没有主题的效果会因操作系统不同而不同。至少,分类指示器不会是标准的。
获取或设置列头标题中的文本是否自动换行。
将在单词之间应用换行符。过长的单词仍将被省略。
与所有使列头看起来不同的设置一样,HeaderUsesThemes必须设置为false,否则操作系统将负责绘制列头,并且不允许自动换行文本。
获取显示列标题提示的工具提示
获取鼠标当前所在行的索引。
获取鼠标当前所在列的索引
获取鼠标当前所在的项/子项的一部分
Gets an extended indication of the part of item/subitem/group that the mouse is currently over
获取鼠标所在的组。
处于“热”状态的项的索引,即在光标下方。-1表示没有项目。
获取和设置对游标下的行应用哪种格式
这仅在UseHotItem为true时生效。
如果样式具有叠加层,则必须对其进行设置。*之前* 将其分配给此属性。之后添加它将被忽略。
获取已安装的热点项样式或合理的默认值。
获取和设置应将哪种格式应用于超链接
获取和设置所选行的背景应该使用什么颜色
返回应用于选定行的背景颜色或合理的默认值
获取和设置所选行的字体应该使用什么颜色
返回应用于选定行的字体颜色或合理的默认值
使用 SelectedBackColor 代替
使用 SelectedBackColorOrDefault 代替
使用 SelectedForeColor 代替
使用 SelectedForeColorOrDefault 代替
使用 UnfocusedSelectedBackColor 代替
使用 UnfocusedSelectedBackColorOrDefault 代替
使用 UnfocusedSelectedForeColor 代替
使用 UnfocusedSelectedForeColorOrDefault 代替
获取或设置是否应将隐藏列包括在复制或拖动到其他应用程序的行的文本表示形式中。
如果为False(默认值),则仅包括可见列。
获取或设置复制行时,列标题是否在文本中。
如果为False(默认值),在文本中将不会显示列标题。
如果当前正在进行单元格编辑操作,则返回TRUE
如果在开发环境中使用ObjectListView,则返回true。
获取当前列表是否正在筛选其内容
当用户在列表中键入内容时,是否应该搜索当前排序列中的值以查找匹配项?
如果为False,则无论排序列是什么,都将始终使用主列。
When this is true, the behavior is like that of ITunes.
获取或设置此控件是否将使用SimpleDropSink接收拖动
此设置将替换任何以前的DropSink。
将其设置为true后,SimpleDropSink仍需要配置为说明它何时可以接受拖动,
以及在拖动某些内容时应该执行什么操作。需要执行这些操作使此属性几乎毫无用处 :(
获取或设置此控件是否将使用SimpleDragSource来启动拖动
此设置将替换之前的任何DragSource
隐藏Items集合,使其在“属性”网格中不可见。
当列表中的项目处于非详细视图中时,此渲染器会绘制项目。在详细信息视图中,负责个体列的呈现器。
获取或设置最后一次排序的列
这是PrimarySortColumn的别名
获取或设置最后一次排序的方向
这是 PrimarySortOrder的别名
获取或设置应用于整个对象列表的筛选器。
列表将立即更新以反映此筛选器。
获取或设置应用于列表中每个模型对象的筛选器
您可能需要考虑使用 而不是此属性,
因为AdditionalFilter在运行时与列筛选相结合。
设置此属性只是替换用户可能已给出的任何列筛选器。
The list is updated immediately to reflect this filter.
Gets the hit test info last time the mouse was moved.
Useful for hot item processing.
获取或设置列表显示的组列表。
此属性与.NET Groups属性的工作方式不同,应将其视为只读属性。
对列表所做的更改不会反映在ListView本身中。
在此列表中添加或删除组是没有意义的,这样的修改不会起到任何作用。
要执行此类操作,必须侦听BeforeCreatingGroups或AboutToCreateGroups事件,
并更改这些事件中的组列表。
获取或设置折叠的OLVGroups的集合。
Gets or sets whether the user wants to owner draw the header control
themselves. If this is false (the default), ObjectListView will use
custom drawing to render the header, if needed.
If you listen for the DrawColumnHeader event, you need to set this to true,
otherwise your event handler will not be called.
获取/设置此列表将显示的对象集合
The contents of the control will be updated immediately after setting this property.
This method preserves selection, if possible. Use if
you do not want to preserve the selection. Preserving selection is the slowest part of this
code and performance is O(n) where n is the number of selected rows.
This method is not thread safe.
The property DOES work on virtual lists: setting is problem-free, but if you try to get it
and the list has 10 million objects, it may take some time to return.
This collection is unfiltered. Use to access just those objects
that survive any installed filters.
Gets the collection of objects that will be considered when creating clusters
(which are used to generate Excel-like column filters)
获取或设置将在ListView顶部绘制的图像
获取或设置将在ListView顶部绘制的文本
获取或设置所有覆盖图的透明度。0表示完全透明,255表示完全不透明。
这已经过时了,请在每个覆盖上使用Transparency。
获取将在ListView顶部绘制的覆盖列表
You can add new overlays and remove overlays that you have added, but
don't mess with the overlays that you didn't create.
Gets or sets whether the ObjectListView will be owner drawn. Defaults to true.
When this is true, all of ObjectListView's neat features are available.
We have to reimplement this property, even though we just call the base
property, in order to change the [DefaultValue] to true.
获取或设置主复选框是否在列表重新生成和筛选操作中保持其值。
此属性仅在未显式设置CheckStateGetter/Putter时才有用。
如果您使用CheckStateGetter/Putter,那么这些方法已经持久化了行的检查性。
此默认值为true。如果为False,则在重新生成或筛选列表时,复选框将丢失其值。
如果在虚拟列表中将其设置为false,则必须安装CheckStateGetter/Putters。
获取或设置记住模型对象的复选框状态的字典
当PersistentCheckBoxs值为TRUE时,此选项用于虚拟列表.
获取或设置最后一次排序的列
获取或设置最后一次排序的方向
获取或设置不可编辑复选框是否绘制为禁用。默认是false。
这仅在所有者描述模式(owner drawn mode)下有效。
以像素为单位指定控件中每行的高度。
列表视图中的行高通常由字体大小和小图像列表大小决定。
此设置允许覆盖该计算(原因是:您仍然不能将行高设置为小于控件中使用的字体的行高)。
将其设置为-1表示使用正常计算方法。
此功能是体验功能!如果您使用此功能,您的程序可能会发生意想不到的事情。
获取每行有多少像素高
获取此控件的每页上显示多少行
获取/设置将用于解析排序时相等的比较的列(第二排序列)。
此设置没有用户界面。它必须以编程方式设置。
获取或设置当使用Second darySortColumn时,它将以什么顺序比较结果
获取或设置当用户按Ctrl+A组合键时是否应选择所有行
获取或设置当用户右键单击列标题时,是否应该显示一个菜单,允许用户选择视图中将显示哪些列
这只是SelectColumnsOnRightClickBehaviour的兼容性包装属性.
获取或设置当右键单击标题时用户如何能够选择列
当列选择菜单打开时,是否应在选择项目后保持打开状态?保持打开状态允许用户一次打开或关闭多个列。
SelectColumnsOnRightClickBehaviour设置为InlineMenu时才有效。当行为设置为SubMenu菜单时,该选项不起作用。
Gets or sets the column that is drawn with a slight tint.
If TintSortColumn is true, the sort column will automatically
be made the selected column.
The colour of the tint is controlled by SelectedColumnTint.
Gets or sets the decoration that will be drawn on all selected rows
获取或设置应该使用什么颜色来给选定的列着色
色调颜色必须是Alpha可混合的,因此如果给定的颜色是纯色(即Alpha=255),则会将其更改为具有合理的Alpha值。
获取或设置当前选定行的索引。
获取索引时,如果没有选择任何行,或者选择了多个行,则返回-1。
获取或设置当前选定的ListViewItem。如果未选择任何行,或者选择了多个行,则返回NULL。
如果只选择了一行,则从当前选定的行获取模型对象。
如果未选择任何行,或选择了多个行,则返回NULL。
设置时,这将选择显示给定模型对象的行,并将焦点放在该行上,取消选择所有其他行。
从当前选定的行中获取模型对象。
如果未选中任何行,则返回的列表为空。
设置此值时,请选择显示给定模型对象的行,取消选择所有其他行。
获取或设置当用户右键单击列标题时,是否应该显示一个菜单,允许他们选择要在列表视图上执行的常见任务
获取或设置当右键单击标题控件时,此ObjectListView是否像筛选菜单一样显示表格
获取或设置是否应按组显示其项目
列表视图是否应该在列标题中显示位图以显示排序方向
The only reason for not wanting to have sort indicators is that, on pre-XP versions of
Windows, having sort indicators required the ListView to have a small image list, and
as soon as you give a ListView a SmallImageList, the text of column 0 is bumped 16
pixels to the right, even if you never used an image.
列表视图是否应该显示子项上的图像
虚拟列表必须是所有者绘制的,才能在子项上显示图像
此属性控制分组标签是否显示该分组项目数量
后缀的格式由GroupWithItemCountFormat/GroupWithItemCountSingularFormat属性控制
获取或设置控件是在所有视图中显示列标题(True),还是仅在详细信息视图中显示列标题(False)
此属性工作不正常。JPP 2010/04/06。
如果它是在创建控件之前设置的,则可以正常工作。
但是,如果在创建控件后将其关闭,则控件将丢失其复选框(奇怪!)
要在创建控件后更改此设置,事情会很复杂。
如果它是关闭的,而我们想要打开它,我们必须更改视图,标题就会出现。
如果它当前处于打开状态,而我们想要将其关闭,则必须更改视图并重新创建控制柄。
重新创建句柄是一个问题,因为它会使我们的复选框样式消失。
该属性不能工作在 Win XP 系统.
重写SmallImageList属性,以便我们可以正确地隐藏其操作。
如果使用RowHeight属性指定行高,则必须在设置/更改RowHeight之前完全初始化SmallImageList。
如果在设置行高之后将新图像添加到图像列表,则必须再次将图像列表分配给控件。像这样简单的事情会奏效的:
listView1.SmallImageList = listView1.SmallImageList;
返回小图像列表中图像的大小或合理的默认值
当列表视图分组时,项是否应该按主列排序?如果为False,则项目将按分组时的同一列进行排序。
当列表视图分组时,一个组的末尾和下一个组的开头之间应该有多少像素
排序列是否应该显示轻微的色调?
获取或设置是否使用三态复选框?
如果为True,用户可以选择第三种状态(通常是不确定的)。
否则,用户在选中和取消选中之间交替单击。
当此设置为False时,CheckStateGetter仍可以返回不确定。
获取或设置列表顶部项目的索引
此属性仅在列表视图处于详细信息视图中且不显示组时才起作用。
显示组时不起作用的原因是,当启用组时,无论滚动位置如何,
Windows msg LVM_GETTOPINDEX总是返回0。
获取或设置将鼠标移到标题上是否会触发CellOver事件。
默认为true。
将鼠标移动到标题上之前不会触发CellOver事件,因为Header被视为单独的控件。
如果此行为更改导致您的应用程序出现问题,请将其设置为False。
如果您想知道鼠标何时在标题上移动,请将此属性设置为true(默认值)。
通过拖动分隔线调整列的大小时,是否应在每次鼠标移动时调整填充空格的列的大小?
如果为False,则释放鼠标时将更新填充栏。
如果空间填充列位于正在调整大小的列的左侧,这看起来会很奇怪:该列的右边缘将被拖动,但由于空间填充列正在收缩,其左边缘将会移动。
这是合乎逻辑的行为--只是看起来不对。
考虑到上述行为,如果空间填充列不是最右边的列,最好关闭该属性。
当控件没有焦点时,应该使用什么颜色作为选定行的背景
当控件没有焦点或合理的默认值时,返回应用于选定行的背景的颜色
当控件没有焦点时,应该使用什么颜色作为选定行的字体颜色。
当控件没有焦点或合理的默认值时,返回应用于选定行的字体颜色
获取或设置列表是否每隔一行提供不同的背景色?默认值为false。
交替行的颜色由AlternateRowBackColor提供。
在.NET中,列表视图在非整行选择模式下有一个“功能”,在这种模式下,所选行不会使用正确的背景色绘制。
是否应该为控件中的每个单元格调用FormatCell事件?
在许多情况下,不执行单元格级格式设置。
如果除非需要,ObjectListView不会为每个单元格触发Format Cell事件,则它的运行速度会稍快一些。
因此,默认情况下,它不会为每个单元格引发事件。
ObjectListView*确实*在每次重新生成行时引发FormatRow事件。各行可以决定是否对行中的每个单元格引发FormatCell事件。
无论此设置如何,只有当ObjectListView处于详细视图中时才会引发FormatCell事件。
所选行是否应使用非标准前景色和背景色绘制?
V2.9不再需要此属性
获取或设置此ObjectListView是否将使用与Vista资源管理器相同的热项和选择机制。
此属性有许多缺陷:
- 这仅适用于Vista及更高版本
- 它不能很好地与AlternateRowBackColors配合使用。
- 它不能很好地与HotItemStyles配合使用。
- 如果FullRowSelect为false,这看起来有点傻。
- 当列表是所有者绘制的时,它根本不起作用(因为所有的绘制都是由渲染器完成的)。
因此,它不能与TreeListView一起工作,因为它们“必须”是所有者绘制的。你仍然可以设置它,但它不会生效。
但如果你一定要看起来像Vista/Win7,这是你的权限。如果这项设置搞砸了其他事情,请不要抱怨。
当此属性设置为True时,ObjectListView将不是所有者描述的。
这将禁用ObjectListView的许多漂亮的基于绘图的功能。
获取或设置列表是否应启用筛选
获取或设置列表是否应将指示符放入列的标题中,以表明它正在筛选该列
如果将其设置为true,HeaderUsesThemes将自动设置为false,因为我们只能在不使用主题标题时绘制筛选器指示器。
鼠标下方的控件(复选框或按钮)是否应该被绘制为“Hot”
如果为False,则当鼠标悬停在控件上时,控件的绘制方式不会有所不同。
如果为False,且UseHotItem和UseHyperLinks为False,则ObjectListView可以跳过鼠标移动的某些处理。这使得鼠标移动处理几乎不使用CPU。
光标下的项是否应以特殊方式设置格式?
获取或设置此列表视图是否应在单元格中显示超链接。
此控件是否应显示覆盖(Overlays)
覆盖(Overlays)在默认情况下是启用的,只有在它们在您的开发环境中造成问题时才需要禁用。
是否应将此控件配置为在子项上显示复选框?
如果将其设置为True,则将为该控件提供一个SmallImageList(如果它还没有一个SmallImageList)。
此外,如果它是一个虚拟列表,它将被设置为所有者描述的,因为虚拟列表不能在没有所有者描述的情况下绘制复选框。
获取或设置ObjectListView是否将使用类似Vista的半透明选择机制。
与UseExplorerTheme不同的是,这个类似Vista的方案可以在XP上运行,并且既适用于所有者描述的列表,也适用于非所有者描述的列表。
这将替换任何已安装的SelectedRowDecory。
如果您不喜欢用于选择的颜色,请忽略此属性,
只需创建您自己的RowBorderDecory并将其分配给SelectedRowDecory,
就像此属性设置器所做的那样。
获取或设置ObjectListView是否将使用类似于Vista的半透明热行突出显示机制。
设置此项将替换任何已安装的HotItemStyle。
如果您不喜欢热项目使用的颜色,请忽略此属性,
只需创建您自己的HotItemStyle,填充所需的值,
并将其分配给HotItemStyle属性,就像此属性设置器所做的那样。
获取/设置此列表视图正在使用的视图样式
切换到平铺(Tile)或详细信息(Details)视图会安装适合该视图的列。令人困惑的是,在平铺视图中,每列都显示为一行信息。
This delegate fetches the checkedness of an object as a boolean only.
Use this if you never want to worry about the
Indeterminate state (which is fairly common).
This is a convenience wrapper around the CheckStateGetter property.
This delegate sets the checkedness of an object as a boolean only. It must return
true or false indicating if the object was checked or not.
Use this if you never want to worry about the
Indeterminate state (which is fairly common).
This is a convenience wrapper around the CheckStatePutter property.
Gets whether or not this listview is capabale of showing groups
获取或设置ObjectListView是否可以依赖正在引发的Application.Idle事件。
在某些主机环境中(例如,在VisualStudio和Office中作为扩展运行时),从不引发Application.Idle事件。
如果不会引发Idle事件,则将其设置为False,ObjectListView将自行引发这些事件。
This delegate fetches the renderer for a particular cell.
If this returns null (or is not installed), the renderer for the column will be used.
If the column renderer is null, then will be used.
This is called every time any cell is drawn. It must be efficient!
This delegate is called when the list wants to show a tooltip for a particular cell.
The delegate should return the text to display, or null to use the default behavior
(which is to show the full text of truncated cell values).
Displaying the full text of truncated cell values only work for FullRowSelect listviews.
This is MS's behavior, not mine. Don't complain to me :)
The name of the property (or field) that holds whether or not a model is checked.
The property be modifiable. It must have a return type of bool (or of bool? if
TriStateCheckBoxes is true).
Setting this property replaces any CheckStateGetter or CheckStatePutter that have been installed.
Conversely, later setting the CheckStateGetter or CheckStatePutter properties will take precedence
over the behavior of this property.
This delegate will be called whenever the ObjectListView needs to know the check state
of the row associated with a given model object.
.NET has no support for indeterminate values, but as of v2.0, this class allows
indeterminate values.
This delegate will be called whenever the user tries to change the check state of a row.
The delegate should return the state that was actually set, which may be different
to the state given.
This delegate can be used to sort the table in a custom fasion.
The delegate must install a ListViewItemSorter on the ObjectListView.
Installing the ItemSorter does the actual work of sorting the ListViewItems.
See ColumnComparer in the code for an example of what an ItemSorter has to do.
Do not install a CustomSorter on a VirtualObjectListView. Override the SortObjects()
method of the IVirtualListDataSource instead.
This delegate is called when the list wants to show a tooltip for a particular header.
The delegate should return the text to display, or null to use the default behavior
(which is to not show any tooltip).
Installing a HeaderToolTipGetter takes precedence over any text in OLVColumn.ToolTipText.
This delegate can be used to format a OLVListItem before it is added to the control.
The model object for the row can be found through the RowObject property of the OLVListItem object.
All subitems normally have the same style as list item, so setting the forecolor on one
subitem changes the forecolor of all subitems.
To allow subitems to have different attributes, do this:
myListViewItem.UseItemStyleForSubItems = false;
.
If UseAlternatingBackColors is true, the backcolor of the listitem will be calculated
by the control and cannot be controlled by the RowFormatter delegate.
In general, trying to use a RowFormatter
when UseAlternatingBackColors is true does not work well.
As it says in the summary, this is called before the item is added to the control.
Many properties of the OLVListItem itself are not available at that point, including:
Index, Selected, Focused, Bounds, Checked, DisplayIndex.
Add the given model object to this control.
The model object to be displayed
See AddObjects() for more details
Add the given collection of model objects to this control.
A collection of model objects
The added objects will appear in their correct sort position, if sorting
is active (i.e. if PrimarySortColumn is not null). Otherwise, they will appear at the end of the list.
No check is performed to see if any of the objects are already in the ListView.
Null objects are silently ignored.
Resize the columns to the maximum of the header width and the data.
Set up any automatically initialized column widths (columns that
have a width of 0 or -1 will be resized to the width of their
contents or header respectively).
Obviously, this will only work once. Once it runs, the columns widths will
be changed to something else (other than 0 or -1), so it wont do anything the
second time through. Use to force all columns
to change their size.
Organise the view items into groups, based on the last sort column or the first column
if there is no last sort column
Organise the view items into groups, based on the given column
If the AlwaysGroupByColumn property is not null,
the list view items will be organisd by that column,
and the 'column' parameter will be ignored.
This method triggers sorting events: BeforeSorting and AfterSorting.
The column whose values should be used for sorting.
Organise the view items into groups, based on the given columns
What column will be used for grouping
What ordering will be used for groups
The column whose values should be used for sorting. Cannot be null
The order in which the values from column will be sorted
When the values from 'column' are equal, use the values provided by this column
How will the secondary values be sorted
This method does not trigger sorting events. Use BuildGroups() to do that
Collect and return all the variables that influence the creation of groups
Make a list of groups that should be shown according to the given parameters
The list of groups to be created
This should not change the state of the control. It is possible that the
groups created will not be used. They may simply be discarded.
Build/rebuild all the list view items in the list, preserving as much state as is possible
Build/rebuild all the list view items in the list
If this is true, the control will try to preserve the selection,
focused item, and the scroll position (see Remarks)
Use this method in situations were the contents of the list is basically the same
as previously.
Clear any cached info this list may have been using
Apply all required extended styles to our control.
Whenever .NET code sets an extended style, it erases all other extended styles
that it doesn't use. So, we have to explicit reapply the styles that we have
added.
Normally, we would override CreateParms property and update
the ExStyle member, but ListView seems to ignore all ExStyles that
it doesn't already know about. Worse, when we set the LVS_EX_HEADERINALLVIEWS
value, bad things happen (the control crashes!).
Give the listview a reasonable size of its tiles, based on the number of lines of
information that each tile is going to display.
Rebuild this list for the given view
Remove all items from this list
This method can safely be called from background threads.
Reset the memory of which URLs have been visited
Copy a text and html representation of the selected rows onto the clipboard.
Be careful when using this with virtual lists. If the user has selected
10,000,000 rows, this method will faithfully try to copy all of them to the clipboard.
From the user's point of view, your program will appear to have hung.
Copy a text and html representation of the given objects onto the clipboard.
Return a html representation of the given objects
Deselect all rows in the listview
Return the ListViewItem that appears immediately after the given item.
If the given item is null, the first item in the list will be returned.
Return null if the given item is the last item.
The item that is before the item that is returned, or null
A ListViewItem
Return the last item in the order they are shown to the user.
If the control is not grouped, the display order is the same as the
sorted list order. But if the list is grouped, the display order is different.
Return the n'th item (0-based) in the order they are shown to the user.
If the control is not grouped, the display order is the same as the
sorted list order. But if the list is grouped, the display order is different.
Return the display index of the given listviewitem index.
If the control is not grouped, the display order is the same as the
sorted list order. But if the list is grouped, the display order is different.
Return the ListViewItem that appears immediately before the given item.
If the given item is null, the last item in the list will be returned.
Return null if the given item is the first item.
The item that is before the item that is returned
A ListViewItem
Insert the given collection of objects before the given position
Where to insert the objects
The objects to be inserted
This operation only makes sense of non-sorted, non-grouped
lists, since any subsequent sort/group operation will rearrange
the list.
This method only works on ObjectListViews and FastObjectListViews.
Return true if the row representing the given model is selected
The model object to look for
Is the row selected
Has the given URL been visited?
The string to be consider
Has it been visited
Scroll the ListView by the given deltas.
Horizontal delta
Vertical delta
Return a point that represents the current horizontal and vertical scroll positions
Remember that the given URL has been visited
The url to be remembered
This does not cause the control be redrawn
Move the given collection of objects to the given index.
This operation only makes sense on non-grouped ObjectListViews.
Calculate what item is under the given point?
Perform a hit test using the Windows control's SUBITEMHITTEST message.
This provides information about group hits that the standard ListView.HitTest() does not.
What is under the given point? This takes the various parts of a cell into accout, including
any custom parts that a custom renderer might use
An information block about what is under the point
Perform a hit test when the control is not owner drawn
Perform a hit test when the control is owner drawn. This hands off responsibility
to the renderer.
Pause (or unpause) all animations in the list
true to pause, false to unpause
Rebuild the columns based upon its current view and column visibility settings
Remove the given model object from the ListView
The model to be removed
See RemoveObjects() for more details
This method is thread-safe.
Remove all of the given objects from the control.
Collection of objects to be removed
Nulls and model objects that are not in the ListView are silently ignored.
This method is thread-safe.
Select all rows in the listview
Set the given image to be fixed in the bottom right of the list view.
This image will not scroll when the list view scrolls.
This method uses ListView's native ability to display a background image.
It has a few limitations:
- It doesn't work well with owner drawn mode. In owner drawn mode, each cell draws itself,
including its background, which covers the background image.
- It doesn't look very good when grid lines are enabled, since the grid lines are drawn over the image.
- It does not work at all on XP.
- Obviously, it doesn't look good when alternate row background colors are enabled.
If you can live with these limitations, native watermarks are quite neat. They are true backgrounds, not
translucent overlays like the OverlayImage uses. They also have the decided advantage over overlays in that
they work correctly even in MDI applications.
Setting this clears any background image.
The image to be drawn. If null, any existing image will be removed.
Set the given image to be background of the ListView so that it appears at the given
percentage offsets within the list.
This has the same limitations as described in . Make sure those limitations
are understood before using the method.
This is very similar to setting the property of the standard .NET ListView, except that the standard
BackgroundImage does not handle images with transparent areas properly -- it renders transparent areas as black. This
method does not have that problem.
Setting this clears any background watermark.
The image to be drawn. If null, any existing image will be removed.
The horizontal percentage where the image will be placed. 0 is absolute left, 100 is absolute right.
The vertical percentage where the image will be placed.
Set the given image to be the tiled background of the ListView.
This has the same limitations as described in and .
Make sure those limitations
are understood before using the method.
The image to be drawn. If null, any existing image will be removed.
Set the collection of objects that will be shown in this list view.
This method can safely be called from background threads.
The list is updated immediately
The objects to be displayed
Set the collection of objects that will be shown in this list view.
This method can safely be called from background threads.
The list is updated immediately
The objects to be displayed
Should the state of the list be preserved as far as is possible.
Update the given model object into the ListView. The model will be added if it doesn't already exist.
The model to be updated
See for more details
This method is thread-safe.
This method will cause the list to be resorted.
This method only works on ObjectListViews and FastObjectListViews.
Update the pre-existing models that are equal to the given objects. If any of the model doesn't
already exist in the control, they will be added.
Collection of objects to be updated/added
This method will cause the list to be resorted.
Nulls are silently ignored.
This method is thread-safe.
This method only works on ObjectListViews and FastObjectListViews.
Change any subscriptions to INotifyPropertyChanged events on our current
model objects so that we no longer listen for events on the old models
and do listen for events on the given collection.
This does nothing if UseNotifyPropertyChanged is false.
获取或设置ObjectListView是否应订阅它给定的模型对象上的INotifyPropertyChanged事件。
这应该在调用SetObjects()之前设置。如果将其设置为False,ObjectListView将取消订阅所有当前模型对象。
如果在虚拟列表上将其设置为true,ObjectListView将遍历列表中尝试订阅更改通知的所有对象。
如果您的虚拟列表中有10,000,000个项目,这可能需要一些时间。
Subscribe to INotifyPropertyChanges on the given collection of objects.
Unsubscribe from INotifyPropertyChanges on the given collection of objects.
If the given collection is null, unsubscribe from all current subscriptions
Return a byte array that represents the current state of the ObjectListView, such
that the state can be restored by RestoreState()
The state of an ObjectListView includes the attributes that the user can modify:
- current view (i.e. Details, Tile, Large Icon...)
- sort column and direction
- column order
- column widths
- column visibility
It does not include selection or the scroll position.
A byte array representing the state of the ObjectListView
Restore the state of the control from the given string, which must have been
produced by SaveState()
A byte array returned from SaveState()
Returns true if the state was restored
Instances of this class are used to store the state of an ObjectListView.
The application is idle. Trigger a SelectionChanged event.
The application is idle. Handle the column resizing event.
Handle the BeginScroll listview notification
True if the event was completely handled
Handle the EndScroll listview notification
True if the event was completely handled
Handle the LinkClick listview notification
True if the event was completely handled
The cell tooltip control wants information about the tool tip that it should show.
Allow the HeaderControl to call back into HandleHeaderToolTipShowing without making that method public
The header tooltip control wants information about the tool tip that it should show.
Event handler for the column click event
Override the basic message pump for this control
Handle the search for item m if possible.
The m to be processed
bool to indicate if the msg has been handled
The user wants to see the context menu.
The windows m
A bool indicating if this m has been handled
We want to ignore context menu requests that are triggered by right clicks on the header
Handle the Custom draw series of notifications
The message
True if the message has been handled
Handle the underlying control being destroyed
Handle the search for item m if possible.
The m to be processed
bool to indicate if the msg has been handled
Find the first row after the given start in which the text value in the
comparison column begins with the given text. The comparison column is column 0,
unless IsSearchOnSortColumn is true, in which case the current sort column is used.
The text to be prefix matched
The index of the first row to consider
Which direction should be searched?
The index of the first row that matched, or -1
The text comparison is a case-insensitive, prefix match. The search will
search the every row until a match is found, wrapping at the end if needed.
Find the first row in the given range of rows that prefix matches the string value of the given column.
The index of the matched row, or -1
Handle the Group Info series of notifications
The message
True if the message has been handled
Handle a key down message
True if the msg has been handled
Toggle the checkedness of the selected rows
Actually, this doesn't actually toggle all rows. It toggles the first row, and
all other rows get the check state of that first row. This is actually a much
more useful behaviour.
If no rows are selected, this method does nothing.
Catch the Left Button down event.
The m to be processed
bool to indicate if the msg has been handled
Handle a left mouse down at the given hit test location
Subclasses can override this to do something unique
True if the message has been handled
Catch the Left Button up event.
The m to be processed
bool to indicate if the msg has been handled
Trigger a GroupExpandCollapse event and return true if the action was cancelled
Catch the Right Button down event.
The m to be processed
bool to indicate if the msg has been handled
Handle a left mouse down at the given hit test location
Subclasses can override this to do something unique
True if the message has been handled
Catch the Left Button double click event.
The m to be processed
bool to indicate if the msg has been handled
Handle a mouse double click at the given hit test location
Subclasses can override this to do something unique
True if the message has been handled
Catch the right Button double click event.
The m to be processed
bool to indicate if the msg has been handled
Handle a right mouse double click at the given hit test location
Subclasses can override this to do something unique
True if the message has been handled
Catch the MouseMove event.
The m to be processed
bool to indicate if the msg has been handled
Handle notifications that have been reflected back from the parent window
The m to be processed
bool to indicate if the msg has been handled
In the notification messages, we handle attempts to change the width of our columns
The m to be processed
bool to indicate if the msg has been handled
Create a ToolTipControl to manage the tooltip control used by the listview control
Update the handle used by our cell tooltip to be the tooltip used by
the underlying Windows listview control.
Handle the WM_PAINT event
Return true if the msg has been handled and nothing further should be done
Perform any steps needed before painting the control
Perform any steps needed after painting the control
Handle the window position changing.
The m to be processed
bool to indicate if the msg has been handled
The user has right clicked on the column headers. Do whatever is required
Return true if this event has been handle
Show a menu that is appropriate when the given column header is clicked.
The index of the header that was clicked. This
can be -1, indicating that the header was clicked outside of a column
Where should the menu be shown
True if a menu was displayed
Create the menu that should be displayed when the user right clicks
on the given column header.
Index of the column that was right clicked.
This can be negative, which indicates a click outside of any header.
The toolstrip that should be displayed
The user has right clicked on the column headers. Do whatever is required
Return true if this event has been handle
Show a popup menu at the given point which will allow the user to choose which columns
are visible on this listview
Where should the menu be placed
Show a popup menu at the given point which will allow the user to choose which columns
are visible on this listview
Where should the menu be placed
获取或设置要用于升序排序命令的文本
获取或设置要用于降序排序命令的文本
获取或设置要用于分组命令的文本
获取或设置要用于锁定分组命令的文本
获取或设置要用于不锁定分组命令的文本
获取或设置要用于关闭分组命令的文本
获取或设置要用于不排序命令的文本
获取或设置要用于列描述的文本
获取或设置要用于选择列描述的文本
Gets or sets the image that will be place next to the Sort Ascending command
Gets or sets the image that will be placed next to the Sort Descending command
Append the column selection menu items to the given menu strip.
The menu to which the items will be added.
Return the menu to which the items were added
Append the column selection menu items to the given menu strip.
The menu to which the items will be added.
Return the menu to which the items were added
Create the menu items that will allow columns to be choosen and add them to the
given collection
Create a Filtering menu
Override the OnColumnReordered method to do what we want
When the column widths are changing, resize the space filling columns
When the column widths change, resize the space filling columns
When the size of the control changes, we have to resize our space filling columns.
Resize our space filling columns so they fill any unoccupied width in the control
Resize our space filling columns so they fill any unoccupied width in the control
Check all rows
Check the checkbox in the given column header
If the given columns header check box is linked to the cell check boxes,
then checkboxes in all cells will also be checked.
Mark the checkbox in the given column header as having an indeterminate value
Mark the given object as indeterminate check state
The model object to be marked indeterminate
Mark the given object as checked in the list
The model object to be checked
Mark the given objects as checked in the list
The model object to be checked
Put a check into the check box at the given cell
Put an indeterminate check into the check box at the given cell
Return true of the given object is checked
The model object whose checkedness is returned
Is the given object checked?
If the given object is not in the list, this method returns false.
Return true of the given object is indeterminately checked
The model object whose checkedness is returned
Is the given object indeterminately checked?
If the given object is not in the list, this method returns false.
Is there a check at the check box at the given cell
Get the checkedness of an object from the model. Returning null means the
model does not know and the value from the control will be used.
Record the change of checkstate for the given object in the model.
This does not update the UI -- only the model
The check state that was recorded and that should be used to update
the control.
Change the check state of the given object to be the given state.
If the given model object isn't in the list, we still try to remember
its state, in case it is referenced in the future.
True if the checkedness of the model changed
Toggle the checkedness of the given object. A checked object becomes
unchecked; an unchecked or indeterminate object becomes checked.
If the list has tristate checkboxes, the order is:
unchecked -> checked -> indeterminate -> unchecked ...
The model object to be checked
Toggle the checkbox in the header of the given column
Obviously, this is only useful if the column actually has a header checkbox.
Toggle the check at the check box of the given cell
Uncheck all rows
Mark the given object as unchecked in the list
The model object to be unchecked
Mark the given objects as unchecked in the list
The model object to be checked
Uncheck the checkbox in the given column header
Uncheck the check at the given cell
返回给定索引处的列
Index of the column to be returned
An OLVColumn
返回给定标题处的列,如果有多个符合要求的标题,则默认只返回第一个
要返回的列的名称
An OLVColumn
返回给定视图可见的列的集合。只有Tile和Details有列;所有其他视图都有0列。
正在为哪个视图计算列?
A list of columns
返回列表中的项目数
列表中的项目数
如果安装了筛选器,这将返回与筛选器匹配的项目数。
返回给定索引处的项
Index of the item to be returned
An OLVListItem
返回给定索引处的模型对象
Index of the model object to be returned
A model object
找出在给定的坐标下的行和列
X 坐标
Y 坐标
给定点下的列项
在给定坐标点下的行项。可以为null。
返回给定索引/列的子项
Index of the item to be returned
Index of the subitem to be returned
An OLVListSubItem
滚动列表视图,使给定组位于顶部。
The group to be revealed
如果该组可见,如果可能,列表仍将滚动以将该组移至顶部。
这只在列表显示分组时才有效(显然)。
这在虚拟列表上不起作用,因为虚拟列表不使用ListViewGroups进行分组。使用 代替.
使给定的模型对象可见
The model object to be revealed
返回选定行的模型对象,如果没有选择或有多个选择,则返回null
Model object or null
返回选定行的模型对象,如果没有选择,则返回空集合
ArrayList
返回选中行的模型对象;如果未选中行或选中多行,则返回NULL
Model object or null
使用 CheckedObject 属性代替本方法
获取选中的模型对象的集合。
使用 CheckedObjects 属性代替本方法
在列表视图中查找给定的模型对象并返回其索引
The model object to be found
The index of the object. -1 means the object was not present
Rebuild the given ListViewItem with the data from its associated model.
This method does not resort or regroup the view. It simply updates
the displayed data of the given item
Rebuild the data on the row that is showing the given object.
This method does not resort or regroup the view.
The given object is *not* used as the source of data for the rebuild.
It is only used to locate the matching model in the collection,
then that matching model is used as the data source. This distinction is
only important in model classes that have overridden the Equals() method.
If you want the given model object to replace the pre-existing model,
use .
Update the rows that are showing the given objects
This method does not resort or regroup the view.
This method can safely be called from background threads.
更新选定的行
This method does not resort or regroup the view.
除任何当前选择外,还选择显示给定模型对象的行。
The object to be selected
Use the property to deselect all other rows
除任何当前选择外,还选择显示给定模型对象的行。
The object to be selected
对象是否也应该被聚焦
Use the property to deselect all other rows
选择显示任意给定模型对象的行。取消选择所有其他行。
A collection of model objects
获取或设置是否冻结列表视图。当列表视图被冻结时,它不会自我更新。
Frozen属性与Freeze()/UnFreeze()方法类似,
不同之处在于将Frozen属性设置为False会立即解冻控件,
而不管有多少未完成的Freeze()调用。
objectListView1.Frozen = false; // unfreeze the control now!
冻结列表视图,使其不再自我更新。
Freeze()/Unfreeze() calls nest correctly
解冻列表视图。如果此调用是最外层的unFreeze(),则将重新构建listview的内容。
Freeze()/Unfreeze() calls nest correctly
在冻结列表视图时执行所需的实际工作
解冻列表视图时执行所需的实际工作
如果选择事件当前挂起,则返回TRUE。在挂起选择事件时,不会引发SelectedIndexChanged或SelectionChanged事件。
Suspend selection events until a matching ResumeSelectionEvents()
is called.
Calls to this method nest correctly. Every call to SuspendSelectionEvents()
must have a matching ResumeSelectionEvents().
Resume raising selection events.
Returns a disposable that will disable selection events
during a using() block.
Implementation only class that suspends and resumes selection
events on instance creation and disposal.
按最后一个排序列和顺序对项目进行排序
按给定列中的值和上次排序顺序对列表视图中的项进行排序
其值将用于排序的列的名称
按给定列中的值和上次排序顺序对列表视图中的项进行排序
其值将用于排序的列的索引
按给定列中的值和上次排序顺序对列表视图中的项进行排序
其值将用于排序的列
按给定列中的值和上次排序顺序对列表视图中的项进行排序
The column whose values will be used for the sorting.
If null, the first column will be used.
The ordering to be used for sorting. If this is None,
this.Sorting and then SortOrder.Ascending will be used
If ShowGroups is true, the rows will be grouped by the given column.
If AlwaysGroupsByColumn is not null, the rows will be grouped by that column,
and the rows within each group will be sorted by the given column.
Put a sort indicator next to the text of the sort column
Put a sort indicator next to the text of the given given column
The column to be marked
The sort order in effect on that column
The name of the image used when a column is sorted ascending
This image is only used on pre-XP systems. System images are used for XP and later
The name of the image used when a column is sorted descending
This image is only used on pre-XP systems. System images are used for XP and later
If the sort indicator images don't already exist, this method will make and install them
Remove any sorting and revert to the given order of the model objects
Do the actual work of creating the given list of groups
For some reason, UseItemStyleForSubItems doesn't work for the colors
when owner drawing the list, so we have to specifically give each subitem
the desired colors
The item whose subitems are to be corrected
Cells drawn via BaseRenderer don't need this, but it is needed
when an owner drawn cell uses DrawDefault=true
Fill in the given OLVListItem with values of the given row
the OLVListItem that is to be stuff with values
the model object from which values will be taken
Make sure the ListView has the extended style that says to display subitem images.
This method must be called after any .NET call that update the extended styles
since they seem to erase this setting.
Convert the given image selector to an index into our image list.
Return -1 if that's not possible
Index of the image in the imageList, or -1
Return the tooltip that should be shown when the mouse is hovered over the given column
The column index whose tool tip is to be fetched
A string or null if no tool tip is to be shown
Return the tooltip that should be shown when the mouse is hovered over the given cell
The column index whose tool tip is to be fetched
The row index whose tool tip is to be fetched
A string or null if no tool tip is to be shown
Return the OLVListItem that displays the given model object
The modelObject whose item is to be found
The OLVListItem that displays the model, or null
This method has O(n) performance.
Do the work required after the items in a listview have been created
Do the work required after one item in a listview have been created
Prepare the listview to show alternate row backcolors
We cannot rely on lvi.Index in this method.
In a straight list, lvi.Index is the display index, and can be used to determine
whether the row should be colored. But when organised by groups, lvi.Index is not
useable because it still refers to the position in the overall list, not the display order.
Setup all subitem images on all rows
Tell the underlying list control which images to show against the subitems
the index at which the item occurs
the item whose subitems are to be set
Tell the underlying list control which images to show against the subitems
the index at which the item occurs
the item whose subitems are to be set
will existing images be cleared if no new image is provided?
Set the subitem image natively
Take ownership of the 'objects' collection. This separats our collection from the source.
This method
separates the 'objects' instance variable from its source, so that any AddObject/RemoveObject
calls will modify our collection and not the original colleciton.
This method has the intentional side-effect of converting our list of objects to an ArrayList.
Trigger FormatRow and possibly FormatCell events for the given item
Trigger FormatCell events for the given item
Make the list forget everything -- all rows and all columns
Use if you want to remove just the rows.
Update our externally visible image list so it holds the same images as our shadow list, but sized correctly
Return a copy of the given source image list, where each image has been resized to be height x height in size.
If source is null, an empty image list of the given size is returned
Height and width of the new images
Height and width of the new images
Source of the images (can be null)
A new image list
Return a bitmap of the given height x height, which shows the given image, centred.
Height and width of new bitmap
Height and width of new bitmap
Image to be centred
The background color
A new bitmap
Initialize the state image list with the required checkbox images
The name of the image used when a check box is checked
The name of the image used when a check box is unchecked
The name of the image used when a check box is Indeterminate
Setup this control so it can display check boxes on subitems
(or primary checkboxes in virtual mode)
This gives the ListView a small image list, if it doesn't already have one.
Make sure the small image list for this control has checkbox images
(used for sub-item checkboxes).
This gives the ListView a small image list, if it doesn't already have one.
ObjectListView has to manage checkboxes on subitems separate from the checkboxes on each row.
The underlying ListView knows about the per-row checkboxes, and to make them work, OLV has to
correctly configure the StateImageList. However, the ListView cannot do checkboxes in subitems,
so ObjectListView has to handle them in a differnt fashion. So, per-row checkboxes are controlled
by images in the StateImageList, but per-cell checkboxes are handled by images in the SmallImageList.
Owner draw the column header
Owner draw the item
Owner draw a single subitem
We need the click count in the mouse up event, but that is always 1.
So we have to remember the click count from the preceding mouse down event.
When the mouse leaves the control, remove any hot item highlighting
When the mouse moves, we might need to change the hot item.
Check to see if we need to start editing a cell
Tell the world that a hyperlink was clicked and if the event isn't handled,
do the default processing.
Do the default processing for a hyperlink clicked event, which
is to try and open the url.
The user right clicked on the control
This method is called every time a row is selected or deselected. This can be
a pain if the user shift-clicks 100 rows. We override this method so we can
trigger one event for any number of select/deselects that come from one user action
Called when the handle of the underlying control is created
This method is called after the control has been fully created.
Should we start editing the cell in response to the given mouse button event?
Handle a key press on this control. We specifically look for F2 which edits the primary column,
or a Tab character during an edit operation, which tries to start editing on the next (or previous) cell.
Start an editing operation on the first editable column of the given model.
If the model doesn't exist, or there are no editable columns, this method
will do nothing.
This will start an edit operation regardless of CellActivationMode.
Begin an edit operation on the given cell.
This performs various sanity checks and passes off the real work to StartCellEdit().
The row to be edited
The index of the cell to be edited
Really start an edit operation on a given cell. The parameters are assumed to be sane.
The row to be edited
The index of the cell to be edited
Calculate the bounds of the edit control for the given item/column
Calculate the bounds of the edit control for the given item/column, when the listview
is being owner drawn.
A rectangle that is the bounds of the cell editor
Calculate the bounds of the edit control for the given item/column, when the listview
is not being owner drawn.
A rectangle that is the bounds of the cell editor
Try to give the given value to the provided control. Fall back to assigning a string
if the value assignment fails.
A control
The value to be given to the control
The string to be given if the value doesn't work
Setup the given control to be a cell editor
Return the value that the given control is showing
Called when the cell editor could be about to lose focus. Time to commit the change
Return the bounds of the given cell
The row to be edited
The index of the cell to be edited
A Rectangle
Return the bounds of the given cell only until the edge of the current text
The row to be edited
The index of the cell to be edited
A Rectangle
Calculate the visible bounds of the given column. The column's bottom edge is
either the bottom of the last row or the bottom of the control.
The bounds of the control itself
The column
A Rectangle
This returns an empty rectnage if the control isn't in Details mode,
OR has doesn't have any rows, OR if the given column is hidden.
Return a control that can be used to edit the value of the given cell.
The row to be edited
The index of the cell to be edited
A Control to edit the given cell
Get the first non-null value of the given column.
At most 1000 rows will be considered.
The first non-null value, or null if no non-null values were found
Return a TextBox that can be used as a default cell editor.
What column does the cell belong to?
Configure the given text box to autocomplete unique values
from the given column. At most 1000 rows will be considered.
The textbox to configure
The column used to calculate values
Configure the given text box to autocomplete unique values
from the given column. At most 1000 rows will be considered.
The textbox to configure
The column used to calculate values
Consider only this many rows
Stop editing a cell and throw away any changes.
If a cell edit is in progress, finish the edit.
Returns false if the finishing process was cancelled
(i.e. the cell editor is still on screen)
This method does not guarantee that the editing will finish. The validation
process can cause the finishing to be aborted. Developers should check the return value
or use IsCellEditing property after calling this method to see if the user is still
editing a cell.
If a cell edit is in progress, finish the edit.
Returns false if the finishing process was cancelled
(i.e. the cell editor is still on screen)
This method does not guarantee that the editing will finish. The validation
process can cause the finishing to be aborted. Developers should check the return value
or use IsCellEditing property after calling this method to see if the user is still
editing a cell.
True if it is likely that another cell is going to be
edited immediately after this cell finishes editing
Finish the cell edit operation, writing changed data back to the model object
This method does not trigger a Validating event, so it always finishes
the cell edit.
Finish the cell edit operation, writing changed data back to the model object
This method does not trigger a Validating event, so it always finishes
the cell edit.
True if it is likely that another cell is going to be
edited immediately after this cell finishes editing
Remove all trace of any existing cell edit operation
True if it is likely that another cell is going to be
edited immediately after this cell finishes editing
True if the cell editor should be disposed
Force the hot item to be recalculated
Force the hot item to be recalculated
The mouse has moved to the given pt. See if the hot item needs to be updated
Where is the mouse?
This is the main entry point for hot item handling
The mouse has moved to the given pt. See if the hot item needs to be updated
This is the main entry point for hot item handling
Update the given row using the current hot item information
Update the given row using the given hot item information
Apply a style to the given row
Apply a style to a cell
Remove hot item styling from the given row
Add the given decoration to those on this list and make it appear
The decoration
A decoration scrolls with the listview. An overlay stays fixed in place.
Add the given overlay to those on this list and make it appear
The overlay
Draw all the decorations
A Graphics
The items that were redrawn and whose decorations should also be redrawn
Is the given decoration shown on this list
The overlay
Is the given overlay shown on this list?
The overlay
Hide any overlays.
This is only a temporary hiding -- the overlays will be shown
the next time the ObjectListView redraws.
Create and configure the empty list msg overlay
Initialize the standard image and text overlays
Make sure that any overlays are visible.
Refresh the display of the overlays
Refresh the display of just one overlays
Remove the given decoration from this list
The decoration to remove
Remove the given overlay to those on this list
The overlay
创建一个筛选器,该筛选器将执行当前安装在可见列上的所有筛选。
Do the actual work of filtering
删除所有列筛选。
根据每列中定义的值筛选更新此ObjectListView的筛选
When some setting related to filtering changes, this method is called.
使用当前安装的模型过滤器更新所有渲染器
获取给定模型的复选框状态。
The model
模型的复选框状态。默认为未选中。
设置给定模型对象的复选框状态
The model to be remembered
The model's checkedness
The state given to the method
忽略任何持久复选框状态
The callbacks for CellEditing events
this
We could replace this with EventHandler<CellEditEventArgs> but that would break all
cell editing event code from v1.x.
A TreeListView combines an expandable tree structure with list view columns.
To support tree operations, two delegates must be provided:
-
CanExpandGetter
This delegate must accept a model object and return a boolean indicating
if that model should be expandable.
-
ChildrenGetter
This delegate must accept a model object and return an IEnumerable of model
objects that will be displayed as children of the parent model. This delegate will only be called
for a model object if the CanExpandGetter has already returned true for that model.
-
ParentGetter
This delegate must accept a model object and return the parent model.
This delegate will only be called when HierarchicalCheckboxes is true OR when Reveal() is called.
The top level branches of the tree are set via the Roots property. SetObjects(), AddObjects()
and RemoveObjects() are interpreted as operations on this collection of roots.
To add new children to an existing branch, make changes to your model objects and then
call RefreshObject() on the parent.
The tree must be a directed acyclic graph -- no cycles are allowed. Put more mundanely,
each model object must appear only once in the tree. If the same model object appears in two
places in the tree, the control will become confused.
This event is triggered when user input requests the expansion of a list item.
This event is triggered when user input requests the collapse of a list item.
This event is triggered after the expansion of a list item due to user input.
This event is triggered after the collapse of a list item due to user input.
Trigger the expanding event
Trigger the collapsing event
Trigger the expanded event
Trigger the collapsed event
This class handles drawing the tree structure of the primary column.
Create a TreeRenderer
Should the renderer draw glyphs at the expansion points?
The expansion points will still function to expand/collapse even if this is false.
Should the renderer draw lines connecting siblings?
Return the pen that will be used to draw the lines between branches
Should the renderer draw triangles as the expansion glyphs?
This looks best with ShowLines = false
Return the branch that the renderer is currently drawing.
Return the TreeListView for which the renderer is being used.
How many pixels will be reserved for each level of indentation?
The real work of drawing the tree is done in this method
Draw the expansion indicator
Gets whether or not we should render using styles
Draw the expansion indicator using styles
Is the mouse over a checkbox in this cell?
Draw the expansion indicator without using styles
Draw the lines of the tree
Do the hit test
Calculate the edit rect
Make a default TreeListView
This is the delegate that will be used to decide if a model object can be expanded.
This is called *often* -- on every mouse move when required. It must be fast.
Don't do database lookups, linear searches, or pi calculations. Just return the
value of a property.
When this delegate is called, the TreeListView is not in a stable state. Don't make
calls back into the control.
Gets whether or not this listview is capable of showing groups
This is the delegate that will be used to fetch the children of a model object
This delegate will only be called if the CanExpand delegate has
returned true for the model object.
When this delegate is called, the TreeListView is not in a stable state. Don't do anything
that will result in calls being made back into the control.
This is the delegate that will be used to fetch the parent of a model object
The parent of the given model, or null if the model doesn't exist or
if the model is a root
Get or set the collection of model objects that are checked.
When setting this property, any row whose model object isn't
in the given collection will be unchecked. Setting to null is
equivalent to unchecking all.
This property returns a simple collection. Changes made to the returned
collection do NOT affect the list. This is different to the behaviour of
CheckedIndicies collection.
When getting CheckedObjects, the performance of this method is O(n) where n is the number of checked objects.
When setting CheckedObjects, the performance of this method is O(n) where n is the number of checked objects plus
the number of objects to be checked.
If the ListView is not currently showing CheckBoxes, this property does nothing. It does
not remember any check box settings made.
Gets or sets the model objects that are expanded.
This can be used to expand model objects before they are seen.
Setting this does *not* force the control to rebuild
its display. You need to call RebuildAll(true).
Gets or sets the filter that is applied to our whole list of objects.
TreeListViews do not currently support whole list filters.
Gets or sets whether this tree list view will display hierarchical checkboxes.
Hierarchical checkboxes is when a parent's "checkedness" is calculated from
the "checkedness" of its children. If all children are checked, the parent
will be checked. If all children are unchecked, the parent will also be unchecked.
If some children are checked and others are not, the parent will be indeterminate.
Hierarchical checkboxes don't work with either CheckStateGetters or CheckedAspectName
(which is basically the same thing). This is because it is too expensive to build the
initial state of the control if these are installed, since the control would have to walk
*every* branch recursively since a single bottom level leaf could change the checkedness
of the top root.
Gets or sets the collection of root objects of the tree
Gets the collection of objects that will be considered when creating clusters
(which are used to generate Excel-like column filters)
After expanding a branch, should the TreeListView attempts to show as much of the
revealed descendents as possible.
The model objects that form the top level branches of the tree.
Setting this does NOT reset the state of the control.
In particular, it does not collapse branches.
Make sure that at least one column is displaying a tree.
If no columns is showing the tree, make column 0 do it.
Gets or sets the renderer that will be used to draw the tree structure.
Setting this to null resets the renderer to default.
If a column is currently rendering the tree, the renderer
for that column will be replaced. If no column is rendering the tree,
column 0 will be given this renderer.
This is the delegate that will be used to create the underlying Tree structure
that the TreeListView uses to manage the information about the tree.
The factory must not return null.
Most users of TreeListView will never have to use this delegate.
Should a wait cursor be shown when a branch is being expanded?
When this is true, the wait cursor will be shown whilst the children of the
branch are being fetched. If the children of the branch have already been cached,
the cursor will not change.
Gets the model that is used to manage the tree structure
Don't mess with this property unless you really know what you are doing.
If you don't already know what it's for, you don't need it.
Return true if the branch at the given model is expanded
Collapse the subtree underneath the given model
Collapse all subtrees within this control
Remove all items from this list
This method can safely be called from background threads.
Collapse all roots and forget everything we know about all models
Expand the subtree underneath the given model object
Expand all the branches within this tree recursively.
Be careful: this method could take a long time for large trees.
Completely rebuild the tree structure
If true, the control will try to preserve selection and expansion
Completely rebuild the tree structure
If not null, this list of objects will be selected after the tree is rebuilt
If not null, this collection of objects will be expanded after the tree is rebuilt
If not null, this collection of objects will be checked after the tree is rebuilt
Unroll all the ancestors of the given model and make sure it is then visible.
This works best when a ParentGetter is installed.
The object to be revealed
If true, the model will be selected and focused after being revealed
True if the object was found and revealed. False if it was not found.
Update the rows that are showing the given objects
Change the check state of the given object to be the given state.
If the given model object isn't in the list, we still try to remember
its state, in case it is referenced in the future.
True if the checkedness of the model changed
Toggle the expanded state of the branch at the given model object
Return whether or not the given model can expand.
The given model must have already been seen in the tree
Return the model object that is the parent of the given model object.
The given model must have already been seen in the tree.
Return the collection of model objects that are the children of the
given model as they exist in the tree at the moment.
This method returns the collection of children as the tree knows them. If the given
model has never been presented to the user (e.g. it belongs to a parent that has
never been expanded), then this method will return an empty collection.
Because of this, if you want to traverse the whole tree, this is not the method to use.
It's better to traverse the your data model directly.
If the given model has not already been seen in the tree or
if it is not expandable, an empty collection will be returned.
Delegates of this type are use to decide if the given model object can be expanded
The model under consideration
Can the given model be expanded?
Delegates of this type are used to fetch the children of the given model object
The parent whose children should be fetched
An enumerable over the children
Delegates of this type are used to fetch the parent of the given model object.
The child whose parent should be fetched
The parent of the child or null if the child is a root
Delegates of this type are used to create a new underlying Tree structure.
The view for which the Tree is being created
A subclass of Tree
Handle a left button down event
Create a OLVListItem for given row index
The index of the row that is needed
An OLVListItem
This differs from the base method by also setting up the IndentCount property.
Reinitialize the Tree structure
Recalculate the state of the checkboxes of all the items in the given list
and their ancestors.
This only makes sense when HierarchicalCheckboxes is true.
Recalculate the hierarchy state of the given item and its ancestors
This only makes sense when HierarchicalCheckboxes is true.
Yield the unique ancestors of the given collection of objects.
The order of the ancestors is guaranteed to be deeper objects first.
Roots will always be last.
Unique ancestors of the given objects
Return all the ancestors of the given model
This uses ParentGetter if possible.
If the given model is a root OR if the model doesn't exist, the collection will be empty
The model whose ancestors should be calculated
Return a collection of ancestors of the given model.
The application is idle and a SelectionChanged event has been scheduled
Decide if the given key event should be handled as a normal key input to the control?
Handle focus being lost, including making sure that the whole control is redrawn.
Handle the keyboard input to mimic a TreeView.
Was the key press handled?
A Tree object represents a tree structure data model that supports both
tree and flat list operations as well as fast access to branches.
If you create a subclass of Tree, you must install it in the TreeListView
via the TreeFactory delegate.
Create a Tree
This is the delegate that will be used to decide if a model object can be expanded.
This is the delegate that will be used to fetch the children of a model object
This delegate will only be called if the CanExpand delegate has
returned true for the model object.
Get or return the top level model objects in the tree
What tree view is this Tree the model for?
Collapse the subtree underneath the given model
The model to be collapsed. If the model isn't in the tree,
or if it is already collapsed, the command does nothing.
The index of the model in flat list version of the tree
Collapse all branches in this tree
Nothing useful
Expand the subtree underneath the given model object
The model to be expanded.
The index of the model in flat list version of the tree
If the model isn't in the tree,
if it cannot be expanded or if it is already expanded, the command does nothing.
Expand all branches in this tree
Return the index of the first branch that was expanded
Return the Branch object that represents the given model in the tree
The model whose branches is to be returned
The branch that represents the given model, or null if the model
isn't in the tree.
Return the number of visible descendents that are below the given model.
The model whose descendent count is to be returned
The number of visible descendents. 0 if the model doesn't exist or is collapsed
Rebuild the children of the given model, refreshing any cached information held about the given object
The index of the model in flat list version of the tree
Is the given model expanded?
Remember whether or not the given model was expanded
Insert the children of the given branch into the given position
The branch whose children should be inserted
The index where the children should be inserted
Rebuild our flat internal list of objects.
Rebuild our reverse index that maps an object to its location
in the filteredObjectList array.
Create a new branch within this tree
Sort the tree on the given column and in the given order
Add the given collection of objects to the roots of this tree
Remove all of the given objects from the roots of the tree.
Any objects that is not already in the roots collection is ignored.
Set the roots of this tree to be the given collection
Update/replace the nth object with the given object
Is this list currently being filtered?
Should the given model be included in this control?
The model to consider
True if it will be included
A Branch represents a sub-tree within a tree
Indicators for branches
FirstBranch of tree
LastChild of parent
OnlyBranch of tree
Create a Branch
Get the ancestor branches of this branch, with the 'oldest' ancestor first.
Can this branch be expanded?
Gets or sets our children
Get/set the model objects that are beneath this branch
Gets a list of all the branches that survive filtering
Gets or set whether this branch is expanded
Return true if this branch is the first branch of the entire tree
Return true if this branch is the last child of its parent
Return true if this branch is the only top level branch
Gets the depth level of this branch
Gets or sets which model is represented by this branch
Return the number of descendents of this branch that are currently visible
Gets or sets our parent branch
Gets or sets our overall tree
Is this branch currently visible? A branch is visible
if it has no parent (i.e. it's a root), or its parent
is visible and expanded.
Clear any cached information that this branch is holding
Collapse this branch
Expand this branch
Expand this branch recursively
Collapse all branches in this tree
Nothing useful
Fetch the children of this branch.
This should only be called when CanExpand is true.
Collapse the visible descendents of this branch into list of model objects
Flatten this branch's visible descendents onto the given list.
The branch itself is not included in the list.
Force a refresh of all children recursively
Sort the sub-branches and their descendents so they are ordered according
to the given comparer.
The comparer that orders the branches
This class sorts branches according to how their respective model objects are sorted
Create a BranchComparer
Order the two branches
Let the world know that a cell edit operation is beginning or ending
Create an event args
Change this to true to cancel the cell editing operation.
During the CellEditStarting event, setting this to true will prevent the cell from being edited.
During the CellEditFinishing event, if this value is already true, this indicates that the user has
cancelled the edit operation and that the handler should perform cleanup only. Setting this to true,
will prevent the ObjectListView from trying to write the new value into the model object.
During the CellEditStarting event, this can be modified to be the control that you want
to edit the value. You must fully configure the control before returning from the event,
including its bounds and the value it is showing.
During the CellEditFinishing event, you can use this to get the value that the user
entered and commit that value to the model. Changing the control during the finishing
event has no effect.
The column of the cell that is going to be or has been edited.
The model object of the row of the cell that is going to be or has been edited.
The listview item of the cell that is going to be or has been edited.
The data value of the cell as it stands in the control.
Only validate during Validating and Finishing events.
The index of the cell that is going to be or has been edited.
The data value of the cell before the edit operation began.
The bounds of the cell that is going to be or has been edited.
Gets or sets whether the control used for editing should be auto matically disposed
when the cell edit operation finishes. Defaults to true
If the control is expensive to create, you might want to cache it and reuse for
for various cells. If so, you don't want ObjectListView to dispose of the control automatically
Event blocks for events that can be cancelled
Has this event been cancelled by the event handler?
BeforeSorting
Create BeforeSortingEventArgs
Create BeforeSortingEventArgs
Did the event handler already do the sorting for us?
What column will be used for grouping
How will groups be ordered
What column will be used for sorting
What order will be used for sorting. None means no sorting.
What column will be used for secondary sorting?
What order will be used for secondary sorting?
Sorting has just occurred.
Create a AfterSortingEventArgs
Create a AfterSortingEventArgs
What column was used for grouping?
What ordering was used for grouping?
What column was used for sorting?
What ordering was used for sorting?
What column was used for secondary sorting?
What order was used for secondary sorting?
This event is triggered when the contents of a list have changed
and we want the world to have a chance to filter the list.
Create a FilterEventArgs
Gets or sets what objects are being filtered
Gets or sets what objects survived the filtering
This event is triggered after the items in the list have been changed,
either through SetObjects, AddObjects or RemoveObjects.
Create a ItemsChangedEventArgs
Constructor for this event when used by a virtual list
Gets how many items were in the list before it changed
Gets how many objects are in the list after the change.
This event is triggered by AddObjects before any change has been made to the list.
Create an ItemsAddingEventArgs
Create an ItemsAddingEventArgs
Gets or sets where the collection is going to be inserted.
Gets or sets the objects to be added to the list
This event is triggered by SetObjects before any change has been made to the list.
When used with a virtual list, OldObjects will always be null.
Create ItemsChangingEventArgs
Gets the objects that were in the list before it change.
For virtual lists, this will always be null.
Gets or sets the objects that will be in the list after it changes.
This event is triggered by RemoveObjects before any change has been made to the list.
Create an ItemsRemovingEventArgs
Gets or sets the objects that will be removed
Triggered after the user types into a list
Create an AfterSearchingEventArgs
Gets the string that was actually searched for
Gets or sets whether an the event handler already handled this event
Gets the index of the row that was selected by the search.
-1 means that no row was matched
Triggered when the user types into a list
Create BeforeSearchingEventArgs
Gets or sets the string that will be found by the search routine
Modifying this value does not modify the memory of what the user has typed.
When the user next presses a character, the search string will revert to what
the user has actually typed.
Gets or sets the index of the first row that will be considered to matching.
The parameter block when telling the world about a cell based event
Gets the ObjectListView that is the source of the event
Gets the model object under the cell
This is null for events triggered by the header.
Gets the row index of the cell
This is -1 for events triggered by the header.
Gets the column index of the cell
This is -1 when the view is not in details view.
Gets the column of the cell
This is null when the view is not in details view.
Gets the location of the mouse at the time of the event
Gets the state of the modifier keys at the time of the event
Gets the item of the cell
Gets the subitem of the cell
This is null when the view is not in details view and
for event triggered by the header
Gets the HitTest object that determined which cell was hit
Gets or set if this event completelely handled. If it was, no further processing
will be done for it.
Tells the world that a cell was clicked
Gets or sets the number of clicks associated with this event
Tells the world that a cell was right clicked
Gets or sets the menu that should be displayed as a result of this event.
The menu will be positioned at Location, so changing that property changes
where the menu will be displayed.
Tell the world that the mouse is over a given cell
Tells the world that the frozen-ness of the ObjectListView has changed.
Make a FreezeEventArgs
How frozen is the control? 0 means that the control is unfrozen,
more than 0 indicates froze.
The parameter block when telling the world that a tool tip is about to be shown.
Gets the tooltip control that is triggering the tooltip event
Gets or sets the text should be shown on the tooltip for this event
Setting this to empty or null prevents any tooltip from showing
In what direction should the text for this tooltip be drawn?
Should the tooltip for this event been shown in bubble style?
This doesn't work reliable under Vista
What color should be used for the background of the tooltip
Setting this does nothing under Vista
What color should be used for the foreground of the tooltip
Setting this does nothing under Vista
What string should be used as the title for the tooltip for this event?
Which standard icon should be used for the tooltip for this event
How many milliseconds should the tooltip remain before it automatically
disappears.
What font should be used to draw the text of the tooltip?
Common information to all hyperlink events
Gets the ObjectListView that is the source of the event
Gets the model object under the cell
Gets the row index of the cell
Gets the column index of the cell
This is -1 when the view is not in details view.
Gets the column of the cell
This is null when the view is not in details view.
Gets the item of the cell
Gets the subitem of the cell
This is null when the view is not in details view
Gets the ObjectListView that is the source of the event
Gets or set if this event completelely handled. If it was, no further processing
will be done for it.
Gets the ObjectListView that is the source of the event
Gets the model object under the cell
Gets the column of the cell
This is null when the view is not in details view.
Gets the text of the cell
Gets or sets whether or not this cell is a hyperlink.
Defaults to true for enabled rows and false for disabled rows.
Gets or sets the url that should be invoked when this cell is clicked.
Setting this to None or String.Empty means that this cell is not a hyperlink
Gets the ObjectListView that is the source of the event
Gets the item of the cell
Gets the model object under the cell
Gets the row index of the cell
Gets the display index of the row
Should events be triggered for each cell in this row?
Parameter block for FormatCellEvent
Gets the column index of the cell
This is -1 when the view is not in details view.
Gets the column of the cell
This is null when the view is not in details view.
Gets the subitem of the cell
This is null when the view is not in details view
Gets the model value that is being displayed by the cell.
This is null when the view is not in details view
The event args when a hyperlink is clicked
Gets the url that was associated with this cell.
The event args when the check box in a column header is changing
Get the column whose checkbox is changing
Get or set the new state that should be used by the column
The event args when the hot item changed
Gets or set if this event completelely handled. If it was, no further processing
will be done for it.
Gets the part of the cell that the mouse is over
Gets an extended indication of the part of item/subitem/group that the mouse is currently over
Gets the index of the column that the mouse is over
In non-details view, this will always be 0.
Gets the index of the row that the mouse is over
Gets the group that the mouse is over
Gets the part of the cell that the mouse used to be over
Gets an extended indication of the part of item/subitem/group that the mouse used to be over
Gets the index of the column that the mouse used to be over
Gets the index of the row that the mouse used to be over
Gets the group that the mouse used to be over
Returns a string that represents the current object.
A string that represents the current object.
2
Let the world know that a checkbox on a subitem is changing
Create a new event block
The column of the cell that is having its checkbox changed.
The model object of the row of the cell that is having its checkbox changed.
The listview item of the cell that is having its checkbox changed.
The current check state of the cell.
The proposed new check state of the cell.
The index of the cell that is going to be or has been edited.
This event argument block is used when groups are created for a list.
Create a CreateGroupsEventArgs
Gets the settings that control the creation of groups
Gets or sets the groups that should be used
Has this event been cancelled by the event handler?
This event argument block is used when the text of a group task is clicked
Create a GroupTaskClickedEventArgs
Gets which group was clicked
This event argument block is used when a group is about to expand or collapse
Create a GroupExpandingCollapsingEventArgs
Gets which group is expanding/collapsing
Gets whether this event is going to expand the group.
If this is false, the group must be collapsing.
This event argument block is used when the state of group has changed (collapsed, selected)
Create a GroupStateChangedEventArgs
Gets whether the group was collapsed by this event
Gets whether the group was focused by this event
Gets whether the group was selected by this event
Gets whether the group was uncollapsed by this event
Gets whether the group was unfocused by this event
Gets whether the group was unselected by this event
Gets which group had its state changed
Gets the previous state of the group
Gets the new state of the group
This event argument block is used when a branch of a tree is about to be expanded
Create a new event args
Gets the model that is about to expand. If null, all branches are going to be expanded.
Gets the OLVListItem that is about to be expanded
This event argument block is used when a branch of a tree has just been expanded
Create a new event args
Gets the model that is was expanded. If null, all branches were expanded.
Gets the OLVListItem that was expanded
This event argument block is used when a branch of a tree is about to be collapsed
Create a new event args
Gets the model that is about to collapse. If this is null, all models are going to collapse.
Gets the OLVListItem that is about to be collapsed. Can be null
This event argument block is used when a branch of a tree has just been collapsed
Create a new event args
Gets the model that is was collapsed. If null, all branches were collapsed
Gets the OLVListItem that was collapsed
This class contains all the settings used when groups are created
Create a GroupingParameters
Gets or sets the ObjectListView being grouped
Gets or sets the column used to create groups
In what order will the groups themselves be sorted?
If this is set, this comparer will be used to order the groups
If this is set, this comparer will be used to order items within each group
Gets or sets the column that will be the primary sort
Gets or sets the ordering for the primary sort
Gets or sets the column used for secondary sorting
Gets or sets the ordering for the secondary sort
Gets or sets the title format used for groups with zero or more than one element
Gets or sets the title format used for groups with only one element
Gets or sets whether the items should be sorted by the primary column
These values indicate what is the state of the group. These values
are taken directly from the SDK and many are not used by ObjectListView.
Normal
Collapsed
Hidden
NoHeader
Can be collapsed
Has focus
Is Selected
Is subsetted
Subset link has focus
All styles
This mask indicates which members of a LVGROUP have valid data. These values
are taken directly from the SDK and many are not used by ObjectListView.
No mask
Group has header
Group has footer
Group has state
pszSubtitle is valid
pszTask is valid
pszDescriptionTop is valid
pszDescriptionBottom is valid
iTitleImage is valid
iExtendedImage is valid
iFirstItem and cItems are valid
pszSubsetTitle is valid
readonly, cItems holds count of items in visible subset, iFirstItem is valid
This mask indicates which members of a GROUPMETRICS structure are valid
Instances of this class enhance the capabilities of a normal ListViewGroup,
enabling the functionality that was released in v6 of the common controls.
In this implementation (2009-09), these objects are essentially passive.
Setting properties does not automatically change the associated group in
the listview. Collapsed and Collapsible are two exceptions to this and
give immediate results.
This really should be a subclass of ListViewGroup, but that class is
sealed (why is that?). So this class provides the same interface as a
ListViewGroup, plus many other new properties.
Create an OLVGroup
按指定标题创建分组
分组标题
Gets or sets the bottom description of the group
Descriptions only appear when group is centered and there is a title image
Gets or sets whether or not this group is collapsed
Gets or sets whether or not this group can be collapsed
Gets or sets some representation of the contents of this group
This is user defined (like Tag)
Gets whether this group has been created.
Gets or sets the int or string that will select the extended image to be shown against the title
Gets or sets the footer of the group
Gets the internal id of our associated ListViewGroup.
Gets or sets the header of the group
Gets or sets the horizontal alignment of the group header
Gets or sets the internally created id of the group
Gets or sets ListViewItems that are members of this group
Listener of the BeforeCreatingGroups event can populate this collection.
It is only used on non-virtual lists.
Gets or sets the key that was used to partition objects into this group
This is user defined (like Tag)
Gets the ObjectListView that this group belongs to
If this is null, the group has not yet been created.
Gets or sets the name of the group
As of 2009-09-01, this property is not used.
Gets or sets whether this group is focused
Gets or sets whether this group is selected
Gets or sets the text that will show that this group is subsetted
As of WinSDK v7.0, subsetting of group is officially unimplemented.
We can get around this using undocumented interfaces and may do so.
Gets or set the subtitleof the task
Gets or sets the value by which this group will be sorted.
Gets or sets the state of the group
Gets or sets which bits of State are valid
Gets or sets whether this group is showing only a subset of its elements
As of WinSDK v7.0, this property officially does nothing.
Gets or sets the user-defined data attached to this group
Gets or sets the task of this group
This task is the clickable text that appears on the right margin
of the group header.
Gets or sets the int or string that will select the image to be shown against the title
Gets or sets the top description of the group
Descriptions only appear when group is centered and there is a title image
Gets or sets the number of items that are within this group.
This should only be used for virtual groups.
Gets or sets the ListViewGroup that is shadowed by this group.
For virtual groups, this will always be null.
Calculate the index into the group image list of the given image selector
Convert this object to a string representation
Insert a native group into the underlying Windows control,
*without* using a ListViewGroup
This is used when creating virtual groups
Insert a native group into the underlying control via a ListViewGroup
Change the members of the group to match the current contents of Items,
using a ListViewGroup
Create a native LVGROUP structure that matches this group
Get the current state of this group from the underlying control
Get the current state of this group from the underlying control
An instance of Munger gets a value from or puts a value into a target object. The property
to be peeked (or poked) is determined from a string. The peeking or poking is done using reflection.
Name of the aspect to be peeked can be a field, property or parameterless method. The name of an
aspect to poke can be a field, writable property or single parameter method.
Aspect names can be dotted to chain a series of references.
Order.Customer.HomeAddress.State
Create a do nothing Munger
Create a Munger that works on the given aspect name
The name of the
A helper method to put the given value into the given aspect of the given object.
This method catches and silently ignores any errors that occur
while modifying the target object
The object to be modified
The name of the property/field to be modified
The value to be assigned
Did the modification work?
Gets or sets whether Mungers will silently ignore missing aspect errors.
By default, if a Munger is asked to fetch a field/property/method
that does not exist from a model, it returns an error message, since that
condition is normally a programming error. There are some use cases where
this is not an error, and the munger should simply keep quiet.
By default this is true during release builds.
The name of the aspect that is to be peeked or poked.
This name can be a field, property or parameter-less method.
The name can be dotted, which chains references. If any link in the chain returns
null, the entire chain is considered to return null.
"DateOfBirth"
"Owner.HomeAddress.Postcode"
Extract the value indicated by our AspectName from the given target.
If the aspect name is null or empty, this will return null.
The object that will be peeked
The value read from the target
Extract the value indicated by our AspectName from the given target, raising exceptions
if the munger fails.
If the aspect name is null or empty, this will return null.
The object that will be peeked
The value read from the target
Poke the given value into the given target indicated by our AspectName.
If the AspectName is a dotted path, all the selectors bar the last
are used to find the object that should be updated, and the last
selector is used as the property to update on that object.
So, if 'target' is a Person and the AspectName is "HomeAddress.Postcode",
this method will first fetch "HomeAddress" property, and then try to set the
"Postcode" property on the home address object.
The object that will be poked
The value that will be poked into the target
bool indicating whether the put worked
Gets the list of SimpleMungers that match our AspectName
Convert a possibly dotted AspectName into a list of SimpleMungers
Evaluate the given chain of SimpleMungers against an initial target.
A SimpleMunger deals with a single property/field/method on its target.
Munger uses a chain of these resolve a dotted aspect name.
Create a SimpleMunger
The name of the aspect that is to be peeked or poked.
This name can be a field, property or method.
When using a method to get a value, the method must be parameter-less.
When using a method to set a value, the method must accept 1 parameter.
It cannot be a dotted name.
Get a value from the given target
Poke the given value into the given target indicated by our AspectName.
The object that will be poked
The value that will be poked into the target
bool indicating if the put worked
These exceptions are raised when a munger finds something it cannot process
Create a MungerException
Get the munger that raised the exception
Gets the target that threw the exception
Wrapper for all native method calls on ListView controls
Put an image under the ListView.
The ListView must have its handle created before calling this.
This doesn't work very well. Specifically, it doesn't play well with owner drawn,
and grid lines are drawn over it.
The image to be used as the background. If this is null, any existing background image will be cleared.
If this is true, the image is pinned to the bottom right and does not scroll. The other parameters are ignored
If this is true, the image will be tiled to fill the whole control background. The offset parameters will be ignored.
If both watermark and tiled are false, this indicates the horizontal percentage where the image will be placed. 0 is absolute left, 100 is absolute right.
If both watermark and tiled are false, this indicates the vertical percentage where the image will be placed.
Flags controlling how the Image List item is
drawn
Draw item normally.
Draw item transparently.
Draw item blended with 25% of the specified foreground colour
or the Highlight colour if no foreground colour specified.
Draw item blended with 50% of the specified foreground colour
or the Highlight colour if no foreground colour specified.
Draw the icon's mask
Draw the icon image without using the mask
Draw the icon using the ROP specified.
Preserves the alpha channel in dest. XP only.
Scale the image to cx, cy instead of clipping it. XP only.
Scale the image to the current DPI of the display. XP only.
Enumeration containing XP ImageList Draw State options
The image state is not modified.
Adds a glow effect to the icon, which causes the icon to appear to glow
with a given color around the edges. (Note: does not appear to be implemented)
Adds a drop shadow effect to the icon. (Note: does not appear to be implemented)
Saturates the icon by increasing each color component
of the RGB triplet for each pixel in the icon. (Note: only ever appears to result in a completely unsaturated icon)
Alpha blends the icon. Alpha blending controls the transparency
level of an icon, according to the value of its alpha channel.
(Note: does not appear to be implemented).
Draws an image using the specified flags and state on XP systems.
The image list from which an item will be drawn
Device context to draw to
Index of image to draw
X Position to draw at
Y Position to draw at
Drawing flags
Width to draw
Height to draw
State flags
Make sure the ListView has the extended style that says to display subitem images.
This method must be called after any .NET call that update the extended styles
since they seem to erase this setting.
The listview to send a m to
Change the virtual list size of the given ListView (which must be in virtual mode)
This will not change the scroll position
The listview to send a message to
How many rows should the list have?
Make sure the ListView has the extended style that says to display subitem images.
This method must be called after any .NET call that update the extended styles
since they seem to erase this setting.
The listview to send a m to
Calculates the number of items that can fit vertically in the visible area of a list-view (which
must be in details or list view.
The listView
Number of visible items per page
For the given item and subitem, make it display the given image
The listview to send a m to
row number (0 based)
subitem (0 is the item itself)
index into the image list
Setup the given column of the listview to show the given image to the right of the text.
If the image index is -1, any previous image is cleared
The listview to send a m to
Index of the column to modifiy
Index into the small image list
Does this version of the operating system have builtin sort indicators?
Are there builtin sort indicators
XP and later have these
Return the bounds of the update region on the given control.
The BeginPaint() system call validates the update region, effectively wiping out this information.
So this call has to be made before the BeginPaint() call.
The control whose update region is be calculated
A rectangle
Validate an area of the given control. A validated area will not be repainted at the next redraw.
The control to be validated
The area of the control to be validated
Select all rows on the given listview
The listview whose items are to be selected
Deselect all rows on the given listview
The listview whose items are to be deselected
Deselect a single row
Set the item state on the given item
The listview whose item's state is to be changed
The index of the item to be changed
Which bits of the value are to be set?
The value to be set
Scroll the given listview by the given deltas
true if the scroll succeeded
Return the handle to the header control on the given list
The listview whose header control is to be returned
The handle to the header control
Return the edges of the given column.
A Point holding the left and right co-ords of the column.
-1 means that the sides could not be retrieved.
Return the edges of the given column.
A Point holding the left and right co-ords of the column.
-1 means that the sides could not be retrieved.
Return the index of the column of the header that is under the given point.
Return -1 if no column is under the pt
The list we are interested in
The client co-ords
The index of the column under the point, or -1 if no column header is under that point
Return the index of the divider under the given point. Return -1 if no divider is under the pt
The list we are interested in
The client co-ords
The index of the divider under the point, or -1 if no divider is under that point
Get the scroll position of the given scroll bar
Change the z-order to the window 'toBeMoved' so it appear directly on top of 'reference'
Make the given control/window a topmost window
Change the size of the window without affecting any other attributes
Show the given window without activating it
The window to show
Mark the given column as being selected.
The OLVColumn or null to clear
This method works, but it prevents subitems in the given column from having
back colors.
A simple-minded implementation of a Dictionary that can handle null as a key.
The type of the dictionary key
The type of the values to be stored
This is not a full implementation and is only meant to handle
collecting groups by their keys, since groups can have null as a key value.
OLVListItems are specialized ListViewItems that know which row object they came from,
and the row index at which they are displayed, even when in group view mode. They
also know the image they should draw against themselves
Create a OLVListItem for the given row object
Create a OLVListItem for the given row object, represented by the given string and image
Gets the bounding rectangle of the item, including all subitems
Gets or sets how many pixels will be left blank around each cell of this item
This setting only takes effect when the control is owner drawn.
Gets or sets how the cells of this item will be vertically aligned
This setting only takes effect when the control is owner drawn.
Gets or sets the checkedness of this item.
Virtual lists don't handle checkboxes well, so we have to intercept attempts to change them
through the items, and change them into something that will work.
Unfortunately, this won't work if this property is set through the base class, since
the property is not declared as virtual.
Enable tri-state checkbox.
.NET's Checked property was not built to handle tri-state checkboxes,
and will return True for both Checked and Indeterminate states.
Gets if this item has any decorations set for it.
Gets or sets the decoration that will be drawn over this item
Setting this replaces all other decorations
Gets the collection of decorations that will be drawn over this item
Gets whether or not this row can be selected and activated
Gets whether any cell on this item is showing a hyperlink
Get or set the image that should be shown against this item
This can be an Image, a string or an int. A string or an int will
be used as an index into the small image list.
Gets or sets the the model object that is source of the data for this list item.
Gets or sets the color that will be used for this row's background when it is selected and
the control is focused.
To work reliably, this property must be set during a FormatRow event.
If this is not set, the normal selection BackColor will be used.
Gets or sets the color that will be used for this row's foreground when it is selected and
the control is focused.
To work reliably, this property must be set during a FormatRow event.
If this is not set, the normal selection ForeColor will be used.
Return the sub item at the given index
Index of the subitem to be returned
An OLVListSubItem
Return bounds of the given subitem
This correctly calculates the bounds even for column 0.
A ListViewSubItem that knows which image should be drawn against it.
Create a OLVListSubItem
Create a OLVListSubItem that shows the given string and image
Gets or sets how many pixels will be left blank around this cell
This setting only takes effect when the control is owner drawn.
Gets or sets how this cell will be vertically aligned
This setting only takes effect when the control is owner drawn.
Gets or sets the model value is being displayed by this subitem.
Gets if this subitem has any decorations set for it.
Gets or sets the decoration that will be drawn over this item
Setting this replaces all other decorations
Gets the collection of decorations that will be drawn over this item
Get or set the image that should be shown against this item
This can be an Image, a string or an int. A string or an int will
be used as an index into the small image list.
Gets or sets the url that should be invoked when this subitem is clicked
Gets or sets whether this cell is selected
Return the state of the animatation of the image on this subitem.
Null means there is either no image, or it is not an animation
An indication of where a hit was within ObjectListView cell
Nowhere
On the text
On the image
On the checkbox
On the expand button (TreeListView)
in a button (cell must have ButtonRenderer)
in the cell but not in any more specific location
UserDefined location1 (used for custom renderers)
On the expand/collapse widget of the group
Somewhere on a group
Somewhere in a column header
Somewhere in a column header checkbox
Somewhere in a header divider
A collection of ListViewHitTest constants
Instances of this class encapsulate the information gathered during a OlvHitTest()
operation.
Custom renderers can use HitTestLocation.UserDefined and the UserData
object to store more specific locations for use during event handlers.
Create a OlvListViewHitTestInfo
Create a OlvListViewHitTestInfo when the header was hit
Where is the hit location?
Where is the hit location?
Which group was hit?
Custom renderers can use this information to supply more details about the hit location
Gets the item that was hit
Gets the subitem that was hit
Gets the part of the subitem that was hit
Gets the ObjectListView that was tested
Gets the model object that was hit
Gets the index of the row under the hit point or -1
Gets the index of the column under the hit point
Gets the index of the header divider
Gets the column that was hit
Returns a string that represents the current object.
A string that represents the current object.
2
A TreeDataSourceAdapter knows how to build a tree structure from a binding list.
To build a tree
Create a data source adaptor that knows how to build a tree structure
Gets or sets the name of the property/column that uniquely identifies each row.
The value contained by this column must be unique across all rows
in the data source. Odd and unpredictable things will happen if two
rows have the same id.
Null cannot be a valid key value.
Gets or sets the name of the property/column that contains the key of
the parent of a row.
The test condition for deciding if one row is the parent of another is functionally
equivilent to this:
Object.Equals(candidateParentRow[this.KeyAspectName], row[this.ParentKeyAspectName])
Unlike key value, parent keys can be null but a null parent key can only be used
to identify root objects.
Gets or sets the value that identifies a row as a root object.
When the ParentKey of a row equals the RootKeyValue, that row will
be treated as root of the TreeListView.
The test condition for deciding a root object is functionally
equivilent to this:
Object.Equals(candidateRow[this.ParentKeyAspectName], this.RootKeyValue)
The RootKeyValue can be null.
Gets or sets whether or not the key columns (id and parent id) should
be shown to the user.
This must be set before the DataSource is set. It has no effect
afterwards.
Gets the DataTreeListView that is being managed
A IVirtualGroups is the interface that a virtual list must implement to support virtual groups
Return the list of groups that should be shown according to the given parameters
Return the index of the item that appears at the given position within the given group.
Return the index of the group to which the given item belongs
Return the index at which the given item is shown in the given group
A hint that the given range of items are going to be required
This is a safe, do nothing implementation of a grouping strategy
Return the list of groups that should be shown according to the given parameters
Return the index of the item that appears at the given position within the given group.
Return the index of the group to which the given item belongs
Return the index at which the given item is shown in the given group
A hint that the given range of items are going to be required
Provides grouping functionality to a FastObjectListView
Create groups for FastListView
This is the COM interface that a ListView must be given in order for groups in virtual lists to work.
This interface is NOT documented by MS. It was found on Greg Chapell's site. This means that there is
no guarantee that it will work on future versions of Windows, nor continue to work on current ones.
Not sure what this does
Not sure what this does
Get the index of the item that occurs at the n'th position of the indicated group.
Index of the group
Index within the group
Index of the item within the whole list
Get the index of the group to which the given item belongs
Index of the item within the whole list
Which occurences of the item is wanted
Index of the group
Get the number of groups that contain the given item
Index of the item within the whole list
How many groups does it occur within
A hint to prepare any cache for the given range of requests
A default implementation of the IOwnerDataCallback interface
A VirtualListDataSource is a complete manner to provide functionality to a virtual list.
An object that implements this interface provides a VirtualObjectListView with all the
information it needs to be fully functional.
Implementors must provide functioning implementations of at least GetObjectCount()
and GetNthObject(), otherwise nothing will appear in the list.
Return the object that should be displayed at the n'th row.
The index of the row whose object is to be returned.
The model object at the n'th row, or null if the fetching was unsuccessful.
Return the number of rows that should be visible in the virtual list
The number of rows the list view should have.
Get the index of the row that is showing the given model object
The model object sought
The index of the row showing the model, or -1 if the object could not be found.
The ListView is about to request the given range of items. Do
whatever caching seems appropriate.
Find the first row that "matches" the given text in the given range.
The text typed by the user
Start searching from this index. This may be greater than the 'to' parameter,
in which case the search should descend
Do not search beyond this index. This may be less than the 'from' parameter.
The column that should be considered when looking for a match.
Return the index of row that was matched, or -1 if no match was found
Sort the model objects in the data source.
Add the given collection of model objects to this control.
A collection of model objects
Insert the given collection of model objects to this control at the position
Index where the collection will be added
A collection of model objects
Remove all of the given objects from the control
Collection of objects to be removed
Set the collection of objects that this control will show.
Update/replace the nth object with the given object
This extension allow virtual lists to filter their contents
All subsequent retrievals on this data source should be filtered
through the given filters. null means no filtering of that kind.
A do-nothing implementation of the VirtualListDataSource interface.
Creates an AbstractVirtualListDataSource
The list view that this data source is giving information to.
Update/replace the nth object with the given object
This is a useful default implementation of SearchText method, intended to be called
by implementors of IVirtualListDataSource.
This class mimics the behavior of VirtualObjectListView v1.x.
Creates a VirtualListVersion1DataSource
How will the n'th object of the data source be fetched?
Designer for and its subclasses.
This designer removes properties and events that are available on ListView but that are not
useful on ObjectListView.
We can't inherit from System.Windows.Forms.Design.ListViewDesigner, since it is marked internal.
So, this class uses reflection to create a ListViewDesigner and then forwards messages to that designer.
Initializes the designer with the specified component.
The to associate the designer with. This component must always be an instance of, or derive from, .
Initializes a newly created component.
A name/value dictionary of default values to apply to properties. May be null if no default values are specified.
Releases the unmanaged resources used by the and optionally releases the managed resources.
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Removes the duplicate DockingActionList added by this designer to the .
adds an internal DockingActionList : 'Dock/Undock in Parent Container'.
But the default designer has already added that action list. So we need to remove one.
Adjusts the set of properties the component exposes through a .
An containing the properties for the class of the component.
Allows a designer to add to the set of events that it exposes through a .
The events for the class of the component.
Allows a designer to change or remove items from the set of attributes that it exposes through a .
The attributes for the class of the component.
Allows a designer to change or remove items from the set of events that it exposes through a .
The events for the class of the component.
Gets the design-time action lists supported by the component associated with the designer.
The design-time action lists supported by the component associated with the designer.
Gets the collection of components associated with the component managed by the designer.
The components that are associated with the component managed by the designer.
Indicates whether a mouse click at the specified point should be handled by the control.
true if a click at the specified point is to be handled by the control; otherwise, false.
A indicating the position at which the mouse was clicked, in screen coordinates.
Processes Windows messages and optionally routes them to the control.
The to process.
This class modifies a ListViewActionList, by removing the "Edit Items" and "Edit Groups" actions.
That class is internal, so we cannot simply subclass it, which would be simplier.
Action lists use reflection to determine if that action can be executed, so we not
only have to modify the returned collection of actions, but we have to implement
the properties and commands that the returned actions use.
This class works in conjunction with the OLVColumns property to allow OLVColumns
to be added to the ObjectListView.
Create a OLVColumnCollectionEditor
What type of object does this editor create?
Edit a given value
What text should be shown in the list for the given object?
Control how the overlay is presented in the IDE
An OLVColumn knows which aspect of an object it should present.
The column knows how to:
- extract its aspect from the row object
- convert an aspect to a string
- calculate the image for the row object
- extract a group "key" from the row object
- convert a group "key" into a title for the group
For sorting to work correctly, aspects from the same column
must be of the same type, that is, the same aspect cannot sometimes
return strings and other times integers.
How should the button be sized?
每个单元格都将具有相同大小的按钮,如ButtonSize属性所示
每个单元格都将绘制一个填充单元格的按钮,该按钮由ButtonPadding插入
将调整每个按钮的大小以包含文本内容
Create an OLVColumn
Initialize a column to have the given title, and show the given aspect
The title of the column
The aspect to be shown in the column
此委托将用于提取要在此列中显示的值。
如果设置, AspectName属性将被忽略.
请记住,如果当前列的AspectGetter是内部生成的,依旧可以随意重新生成
应调用以获取要在此列中显示的值的属性或方法的名称。
仅当未指定ValueGetterDelegate时才使用此选项。
此名称可以用来表示对属性或无参数方法的链引用。
"DateOfBirth"
"Owner.HomeAddress.Postcode"
此委托将用于将编辑后的值放回模型对象中。
如果IsEdable==false,则不执行任何操作。
用于将要在此列中显示的Aspect转换为字符串的委托。
如果设置了此值,AspectToStringFormat将被忽略。
将Aspect转换成字符串的格式文本
此字符串作为第一个参数传递给String.Format()方法。
仅当尚未设置AspectToStringConverter时才使用此选项。
"{0:C}" 表示转换数字到货币
获取或设置单元格编辑器是否应使用自动完成
获取或设置单元格编辑器是否应使用自动完成
获取用户操作是否可以隐藏此列
这会同时考虑Hideable属性以及此列是否为列表视图的主列(列0)。
编辑单元格时,是否应该使用整个单元格(减去复选框或图像使用的任何空间)?
如果控件不是所有者绘制(owner drawn)的,则始终将其视为true。
如果该值为False(默认值)并且控件是所有者绘制(owner drawn)的,
ObjectListView将尝试计算单元格实际内容的宽度,然后将编辑控件的大小调整为恰到好处的宽度。
如果为真,则无论单元格的内容如何,都将使用单元格的整个宽度。
如果未在列上设置此属性,则将使用控件中的值
仅当控件处于详细信息视图中时才使用此值。
无论此设置如何,开发人员都可以通过侦听CellEditStarting事件来指定编辑控件的确切大小。
获取编辑此列中的单元格时是否应使用整个单元格
这将计算当前有效值,该值可能与CellEditUseWholeCell不同
获取或设置此列中此单元格周围将留空的像素数
此设置仅在控件为所有者绘制(owner drawn)时生效。
获取或设置此列中的单元格垂直对齐的方式。
此设置仅在控件为所有者绘制(owner drawn)时生效。
如果未设置,将使用控件本身的值。
获取或设置此列是否显示复选框。
在第0列上设置此选项不起作用。列0复选框由ObjectListView本身的CheckBox属性控制。
Gets or sets the clustering strategy used for this column.
The clustering strategy is used to build a Filtering menu for this item.
If this is null, a useful default will be chosen.
To disable filtering on this colummn, set UseFiltering to false.
Cluster strategies belong to a particular column. The same instance
cannot be shared between multiple columns.
获取或设置是否启用此列中的按钮(如果此列是按钮),即使该行本身被禁用
此列是否应该调整大小以填充列表视图中的空闲空间?
如果希望两列(或更多列)平均共享可用空间,请将此属性设置为True。
如果希望此列具有更大或更小的可用空间份额,则必须显式设置FreeSpaceProportion属性。
空间填充列仍然由MinimumWidth和MaximumWidth属性控制。
///
控件中未占用的水平空间应分配给此列的比例是多少?
在某些情况下,如果列(通常是最右边的列)可以随着列表视图的扩展而扩展,
这样就可以在不必水平滚动的情况下尽可能多地看到列(您永远不应该让用户必须水平滚动任何内容!)。
调整空间填充列的大小以占据列表视图的未占用宽度的一部分(未占用宽度是一旦所有非填充列都被赋予其空间后剩余的宽度)。
此属性指示将分配给此列的未占用空间的相对比例。此属性的实际值并不重要,重要的是它的值相对于其他列中的值。
例子:
-
如果只有一个空间填充列,则无论FreeSpaceProportion中的值如何,都将为其提供所有可用空间。
-
如果有两个或多个空间填充列,并且它们的FreeSpaceProportion值都相同,则它们将平等地共享空闲空间。
-
如果FreeSpaceProportion有三个值为3、2和1的空间填充列,则第一列将占用一半的空闲空间,第二列将占用三分之一的空闲空间,第三列将占用六分之一的空闲空间。
获取或设置在单击此列的标题时是否对此列值重新生成组。
此设置仅在ShowGroups为true时使用。
如果为False,则单击标题不会重建组。
如果为false,则仍会激发BeforeCreatingGroups事件,这些事件可用于根据具体情况进行分组或提供反馈。
当组已创建但尚未成为真正的ListViewGroup时,将调用此委托。用户可以利用此机会填写有关该组的许多其他详细信息。
调用此委托以获取对象,该对象是给定行所属的组的键。
调用此委托将组键转换为该组的标题。
当列表视图按此列分组并且组标题有项目计数时,应如何设置标签的格式
给定的格式字符串支持以下两个占位符:
- {0} - 原组标题
- {1} - 该组项目数
"{0} [{1} items]"
获取this.GroupWithItemCountFormat或默认值
如果未设置GroupWithItemCountFormat,则如果可能,将从ObjectListView中获取其值。
当列表视图按此列分组并且组标题有项目计数时,如果组中只有一个项目,标签应该如何格式化
给定的格式字符串支持以下两个占位符:
- {0} - 原组标题
- {1} - 该组项目数 (始终为1)
"{0} [{1} item]"
获取this.GroupWithItemCountSingularFormat或默认值
如果未设置此值,将使用列表视图中的值
获取是否应在列标题中使用筛选器指示符绘制此列。
获取或设置将用于所有者绘制标题列的委托。
获取或设置将用于绘制此列标题的样式
仅当拥有的ObjectListView将HeaderUsesThemes设置为False时才使用此选项。
获取或设置绘制此列的标题时使用的字体
您可能应该使用HeaderFormatStyle而不是此属性
这仅在HeaderUsesThemes为false时使用。
获取或设置绘制此列标题文本的颜色
您可能应该使用HeaderFormatStyle而不是此属性
这仅在HeaderUsesThemes为false时使用。
获取或设置将在列标题中显示的图像键
这仅在HeaderUsesThemes为false时使用
获取或设置Header文本的对齐方式
返回Header的文本对齐方式。这将是显式设置的,或者将遵循列中文本的对齐方式
获取转换为StringAlignment的Header对齐方式
获取此列的标题中是否有图像
获取或设置此Header是否在Header中放置复选框
获取或设置此Header是否在Header中放置三态复选框
获取或设置此列Header中复选框的选中状态
获取或设置选中/取消选中标题复选框的值是否会导致将此列中所有单元格的复选框设置为相同的选中/取消选中。
默认值为true.
当单元格的复选框状态改变时,该函数不会与自动更新标题的功能相反。
此属性在TreeListView上的行为最好描述为未定义,应该避免。
此操作(检查/取消检查所有行)的性能为O(n),其中n是行数。它将在大型虚拟列表上工作,但可能需要一些时间。
获取或设置是否禁用标题中的复选框
单击禁用的复选框不会更改其值,但会引发HeaderCheckBoxChanging事件,使程序员有机会执行适当的操作。
获取或设置用户是否可以隐藏此列。
无论此设置如何,列0永远不能隐藏。
获取或设置此列中的文本值是否类似于超链接
这是属性的名称,将调用该属性来获取应该在此列中显示的图像的图像选择器。
它可以返回int、String、Image或NULL。
如果ImageGetter不为空,则忽略此项。
该属性可以使用以下返回值来标识图像:
- null或-1 --表示无图像
- int -- Int值将用作图像列表的索引
- String -- 字符串值将用作图像列表的关键字
- Image -- 将直接绘制图像(仅在OwnerDrawn模式下)
调用此委托以获取应该在此列中显示的图像的图像选择器。它可以返回int、String、Image或NULL。
该属性可以使用以下返回值来标识图像:
- null或-1 --表示无图像
- int -- Int值将用作图像列表的索引
- String -- 字符串值将用作图像列表的关键字
- Image -- 将直接绘制图像(仅在OwnerDrawn模式下)
获取或设置此列是否在其单元格中绘制按钮
如果将其设置为true,则列的呈现器将成为ColumnButtonRenender(如果尚未成为ColumnButtonRenender)。如果设置为False,则将丢弃以前的任何按钮渲染器
如果单元格的Aspect为Null或空,则不会在单元格中绘制任何内容。
Create a ColumnButtonRenderer to draw buttons in this column
Fill in details to our ColumnButtonRenderer based on the properties set on the column
获取或设置按钮可以占用的最大宽度。
-1 表示不限制最大宽度
仅当SizingMode为TextBound时才生效
获取或设置当SizingMode为TextBound时单元格周围的额外空间
获取或设置SizingMode为FixedBound时按钮的大小
如果未设置,将使用单元格的边界
获取或设置此列显示按钮时如何调整每个按钮的大小
此列中显示的值是否可以编辑
此默认值为false,因为控制列表视图的可编辑性的主要方法是列表视图本身。
列表视图可编辑后,所有列也可编辑,除非程序员显式将它们标记为不可编辑
是否是固定宽度
获取/设置当视图切换到平铺视图(TileView)时是否使用此列。
无论此设置如何,第0列始终包含在平铺视图中。平铺视图不能很好地处理许多“列”信息。两三个最好。
获取或设置Header的文本是否应垂直呈现。
如果为True,最好将ToolTipText设置为列的名称,以便于阅读。
垂直Header仅为文本。他们不会画出图像。
该列是否可见
更改此值后,必须调用RebuildColumns()才能使更改生效。
此列最后一次定位在详细信息视图列中的位置是什么
DisplayIndex是易失性的。一旦从控件中移除列,就无法发现它在显示顺序中的位置。
即使列不在列表视图的活动列中,此属性也会保护该信息。
列最大宽度
-1表示不限制. 将该值指定为与MinimumWidth相同的值,以生成固定宽度的列。
列最小宽度
-1表示不限制. 将该值指定为与MaximumWidth相同的值,以生成固定宽度的列。
Get/set the renderer that will be invoked when a cell needs to be redrawn
This delegate is called when a cell needs to be drawn in OwnerDrawn mode.
This method is kept primarily for backwards compatibility.
New code should implement an IRenderer, though this property will be maintained.
获取或设置执行文本搜索时是否使用此列的单元格中的文本。
如果为False,则文本筛选器在查找匹配项时不会尝试搜索此列单元格。
获取或设置一个委托,该委托将返回在使用基于文本的筛选器时应考虑进行文本匹配的文本值数组。
获取或设置此列的标题是否将包括该列的文本。
如果为false,则列标题中呈现的唯一内容将是来自 .
只有在以下情况下才会考虑此设置: ObjectListView中的 为false .
获取或设置当用户单击此列的标题时是否重新排序列表内容。
如果为False,则单击标题将不会对列表进行排序,但也不会提供有关列表未排序原因的任何反馈。提供适当的反馈是程序员的责任。
如果为false,则仍会触发BeforeSorting事件,该事件可用于根据具体情况进行排序或提供反馈。
获取或设置列内容的水平对齐方式。
NET将不允许列0具有除左对齐以外的任何对齐方式。我们不能更改列表视图的基本行为,但当所有者绘制时,列0现在可以有其他对齐方式。
获取列文本对齐的StringAlignment等效项
当鼠标悬停在该列的标题上时,应该显示什么字符串?
如果拥有的ObjectListView上安装了HeaderToolTipGetter,则将忽略此值。
此列是否应该有一个三态复选框
如果为True,用户可以选择第三种状态(通常是不确定的)。
按列纵横比的首字母对对象进行分组
一种常见的模式是按该组的值的首字母对列进行分组。aspect必须是字符串(显然)。
获取或设置此列是否应为用户可筛选的列
Gets or sets a filter that will only include models where the model's value
for this column is one of the values in ValuesChosenForFiltering
Gets or sets the values that will be used to generate a filter for this
column. For a model to be included by the generated filter, its value for this column
must be in this list. If the list is null or empty, this column will
not be used for filtering.
列宽
获取或设置此列单元格的内容是否应自动换行
如果此列使用自定义IRenender(即,不是从BaseRenender派生的),则该呈现器负责实现自动换行。
For a given group value, return the string that should be used as the groups title.
The group key that is being converted to a title
string
Get the checkedness of the given object for this column
The row object that is being displayed
The checkedness of the object
Put the checkedness of the given object for this column
The row object that is being displayed
The checkedness of the object
For a given row object, extract the value indicated by the AspectName property of this column.
The row object that is being displayed
An object, which is the aspect named by AspectName
For a given row object, return the object that is the key of the group that this row belongs to.
The row object that is being displayed
Group key object
For a given row object, return the image selector of the image that should displayed in this column.
The row object that is being displayed
int or string or Image. int or string will be used as index into image list. null or -1 means no image
Return the image that represents the check box for the given model
For a given row object, return the strings that will be searched when trying to filter by string.
This will normally be the simple GetStringValue result, but if this column is non-textual (e.g. image)
you might want to install a SearchValueGetter delegate which can return something that could be used
for text filtering.
The array of texts to be searched. If this returns null, search will not match that object.
For a given row object, return the string representation of the value shown in this column.
For aspects that are string (e.g. aPerson.Name), the aspect and its string representation are the same.
For non-strings (e.g. aPerson.DateOfBirth), the string representation is very different.
For a given row object, return the object that is to be displayed in this column.
The row object that is being displayed
An object, which is the aspect to be displayed
Update the given model object with the given value using the column's
AspectName.
The model object to be updated
The value to be put into the model
Update the given model object with the given value
The model object to be updated
The value to be put into the model
Convert the aspect object to its string representation.
If the column has been given a AspectToStringConverter, that will be used to do
the conversion, otherwise just use ToString().
The returned value will not be null. Nulls are always converted
to empty strings.
The value of the aspect that should be displayed
A string representation of the aspect
Decide the clustering strategy that will be used for this column
Gets or sets the type of data shown in this column.
If this is not set, it will try to get the type
by looking through the rows of the listview.
This event is triggered when the visibility of this column changes.
Tell the world when visibility of a column changes.
Create groupies
This is an untyped version to help with Generator and OLVColumn attributes
Create groupies
Create groupies
Create groupies
Create groupies.
Install delegates that will group the columns aspects into progressive partitions.
If an aspect is less than value[n], it will be grouped with description[n].
If an aspect has a value greater than the last element in "values", it will be grouped
with the last element in "descriptions".
Array of values. Values must be able to be
compared to the aspect (using IComparable)
The description for the matching value. The last element is the default description.
If there are n values, there must be n+1 descriptions.
this.salaryColumn.MakeGroupies(
new UInt32[] { 20000, 100000 },
new string[] { "Lowly worker", "Middle management", "Rarified elevation"});
Create groupies based on exact value matches.
Install delegates that will group rows into partitions based on equality of this columns aspects.
If an aspect is equal to value[n], it will be grouped with description[n].
If an aspect is not equal to any value, it will be grouped with "[other]".
Array of values. Values must be able to be
equated to the aspect
The description for the matching value.
this.marriedColumn.MakeEqualGroupies(
new MaritalStatus[] { MaritalStatus.Single, MaritalStatus.Married, MaritalStatus.Divorced, MaritalStatus.Partnered },
new string[] { "Looking", "Content", "Looking again", "Mostly content" });
An adorment is the common base for overlays and decorations.
Gets or sets the corner of the adornment that will be positioned at the reference corner
Gets or sets location within the reference rectange where the adornment will be drawn
This is a simplied interface to ReferenceCorner and AdornmentCorner
Gets or sets the offset by which the position of the adornment will be adjusted
Gets or sets the point of the reference rectangle to which the adornment will be aligned.
Gets or sets the degree of rotation by which the adornment will be transformed.
The centre of rotation will be the center point of the adornment.
Gets or sets the transparency of the overlay.
0 is completely transparent, 255 is completely opaque.
Calculate the location of rectangle of the given size,
so that it's indicated corner would be at the given point.
The point
Which corner will be positioned at the reference point
CalculateAlignedPosition(new Point(50, 100), new Size(10, 20), System.Drawing.ContentAlignment.TopLeft) -> Point(50, 100)
CalculateAlignedPosition(new Point(50, 100), new Size(10, 20), System.Drawing.ContentAlignment.MiddleCenter) -> Point(45, 90)
CalculateAlignedPosition(new Point(50, 100), new Size(10, 20), System.Drawing.ContentAlignment.BottomRight) -> Point(40, 80)
Calculate a rectangle that has the given size which is positioned so that
its alignment point is at the reference location of the given rect.
Create a rectangle of the given size which is positioned so that
its indicated corner is at the indicated corner of the reference rect.
Creates a rectangle so that its bottom left is at the centre of the reference:
corner=BottomLeft, referenceCorner=MiddleCenter
This is a powerful concept that takes some getting used to, but is
very neat once you understand it.
Return the point at the indicated corner of the given rectangle (it doesn't
have to be a corner, but a named location)
The reference rectangle
Which point of the rectangle should be returned?
A point
CalculateReferenceLocation(new Rectangle(0, 0, 50, 100), System.Drawing.ContentAlignment.TopLeft) -> Point(0, 0)
CalculateReferenceLocation(new Rectangle(0, 0, 50, 100), System.Drawing.ContentAlignment.MiddleCenter) -> Point(25, 50)
CalculateReferenceLocation(new Rectangle(0, 0, 50, 100), System.Drawing.ContentAlignment.BottomRight) -> Point(50, 100)
Given the item and the subitem, calculate its bounds.
Apply any specified rotation to the Graphic content.
The Graphics to be transformed
The rotation will be around the centre of this rect
Reverse the rotation created by ApplyRotation()
An overlay that will draw an image over the top of the ObjectListView
Gets or sets the image that will be drawn
Gets or sets if the image will be shrunk to fit with its horizontal bounds
Draw the image in its specified location
The Graphics used for drawing
The bounds of the rendering
Draw the image in its specified location
The image to be drawn
The Graphics used for drawing
The bounds of the rendering
How transparent should the image be (0 is completely transparent, 255 is opaque)
Draw the image in its specified location
The image to be drawn
The Graphics used for drawing
The bounds of the rendering
How big should the image be?
How transparent should the image be (0 is completely transparent, 255 is opaque)
Draw the image in its specified location, scaled so that it is not wider
than the given rectangle. Height is scaled proportional to the width.
The image to be drawn
The Graphics used for drawing
The bounds of the rendering
How transparent should the image be (0 is completely transparent, 255 is opaque)
Utility to draw a bitmap transparenly.
An adornment that will draw text
Gets or sets the background color of the text
Set this to Color.Empty to not draw a background
Gets the brush that will be used to paint the text
Gets or sets the color of the border around the billboard.
Set this to Color.Empty to remove the border
Gets the brush that will be used to paint the text
Gets or sets the width of the border around the text
How rounded should the corners of the border be? 0 means no rounding.
If this value is too large, the edges of the border will appear odd.
Gets or sets the font that will be used to draw the text
Gets the font that will be used to draw the text or a reasonable default
Does this text have a background?
Does this overlay have a border?
Gets or sets the maximum width of the text. Text longer than this will wrap.
0 means no maximum.
Gets or sets the formatting that should be used on the text
Gets or sets the text that will be drawn
Gets the brush that will be used to paint the text
Gets or sets the color of the text
Gets or sets whether the text will wrap when it exceeds its bounds
Draw our text with our stored configuration in relation to the given
reference rectangle
The Graphics used for drawing
The reference rectangle in relation to which the text will be drawn
Draw the given text with our stored configuration
The Graphics used for drawing
The reference rectangle in relation to which the text will be drawn
The text to draw
How opaque should be text be
Draw the text with a border
The Graphics used for drawing
The bounds within which the text should be drawn
The text to draw
How opaque should be text be
Return the rectangle that will be the precise bounds of the displayed text
The bounds of the text
Return a GraphicPath that is a round cornered rectangle
The rectangle
The diameter of the corners
A round cornered rectagle path
If I could rely on people using C# 3.0+, this should be
an extension method of GraphicsPath.
A decoration is an overlay that draws itself in relation to a given row or cell.
Decorations scroll when the listview scrolls.
Gets or sets the row that is to be decorated
Gets or sets the subitem that is to be decorated
An AbstractDecoration is a safe do-nothing implementation of the IDecoration interface
Gets or sets the row that is to be decorated
Gets or sets the subitem that is to be decorated
Gets the bounds of the decorations row
Get the bounds of the decorations cell
Draw the decoration
This decoration draws a slight tint over a column of the
owning listview. If no column is explicitly set, the selected
column in the listview will be used.
The selected column is normally the sort column, but does not have to be.
Create a TintedColumnDecoration
Create a TintedColumnDecoration
Gets or sets the column that will be tinted
Gets or sets the color that will be 'tinted' over the selected column
Draw a slight colouring over our tinted column
This overlay only works when:
- the list is in Details view
- there is at least one row
- there is a selected column (or a specified tint column)
This decoration draws an optionally filled border around a rectangle.
Subclasses must override CalculateBounds().
Create a BorderDecoration
Create a BorderDecoration
The pen used to draw the border
Create a BorderDecoration
The pen used to draw the border
The brush used to fill the rectangle
Gets or sets the pen that will be used to draw the border
Gets or sets the padding that will be added to the bounds of the item
before drawing the border and fill.
How rounded should the corners of the border be? 0 means no rounding.
If this value is too large, the edges of the border will appear odd.
Gets or sets the brush that will be used to fill the border
This value is ignored when using gradient brush
Gets or sets the color that will be used as the start of a gradient fill.
This and FillGradientTo must be given value to show a gradient
Gets or sets the color that will be used as the end of a gradient fill.
This and FillGradientFrom must be given value to show a gradient
Gets or sets the fill mode that will be used for the gradient.
Draw a filled border
Subclasses should override this to say where the border should be drawn
Do the actual work of drawing the filled border
Create a GraphicsPath that represents a round cornered rectangle.
If this is 0 or less, the rectangle will not be rounded.
Instances of this class draw a border around the decorated row
Gets or sets the index of the left most column to be used for the border
Gets or sets the index of the right most column to be used for the border
Calculate the boundaries of the border
Instances of this class draw a border around the decorated subitem.
Calculate the boundaries of the border
This decoration puts a border around the cell being edited and
optionally "lightboxes" the cell (makes the rest of the control dark).
Create a EditingCellBorderDecoration
Create a EditingCellBorderDecoration
Should the decoration use a lighbox display style?
Gets or set whether the decoration should make the rest of
the control dark when a cell is being edited
If this is true, FillBrush is used to overpaint
the control.
Draw the decoration
This decoration causes everything *except* the row under the mouse to be overpainted
with a tint, making the row under the mouse stand out in comparison.
The darker and more opaque the fill color, the more obvious the
decorated row becomes.
Create a LightBoxDecoration
Draw a tint over everything in the ObjectListView except the
row under the mouse.
Instances of this class put an Image over the row/cell that it is decorating
Create an image decoration
Create an image decoration
Create an image decoration
Create an image decoration
Create an image decoration
Gets or sets the item being decorated
Gets or sets the sub item being decorated
Draw this decoration
The ObjectListView being decorated
The Graphics used for drawing
The bounds of the rendering
Instances of this class draw some text over the row/cell that they are decorating
Create a TextDecoration
Create a TextDecoration
Create a TextDecoration
Create a TextDecoration
Create a TextDecoration
Gets or sets the item being decorated
Gets or sets the sub item being decorated
Draw this decoration
The ObjectListView being decorated
The Graphics used for drawing
The bounds of the rendering
The interface for an object which can draw itself over the top of
an ObjectListView.
Draw this overlay
The ObjectListView that is being overlaid
The Graphics onto the given OLV
The content area of the OLV
An interface for an overlay that supports variable levels of transparency
Gets or sets the transparency of the overlay.
0 is completely transparent, 255 is completely opaque.
A null implementation of the IOverlay interface
Draw this overlay
The ObjectListView that is being overlaid
The Graphics onto the given OLV
The content area of the OLV
How transparent should this overlay be?
An overlay that will draw an image over the top of the ObjectListView
Create an ImageOverlay
Gets or sets the horizontal inset by which the position of the overlay will be adjusted
Gets or sets the vertical inset by which the position of the overlay will be adjusted
Draw this overlay
The ObjectListView being decorated
The Graphics used for drawing
The bounds of the rendering
An overlay that will draw text over the top of the ObjectListView
Create a TextOverlay
Gets or sets the horizontal inset by which the position of the overlay will be adjusted
Gets or sets the vertical inset by which the position of the overlay will be adjusted
Gets or sets whether the border will be drawn with rounded corners
Draw this overlay
The ObjectListView being decorated
The Graphics used for drawing
The bounds of the rendering
A Billboard overlay is a TextOverlay positioned at an absolute point
Create a BillboardOverlay
Gets or sets where should the top left of the billboard be placed
Draw this overlay
The ObjectListView being decorated
The Graphics used for drawing
The bounds of the rendering
Renderers are the mechanism used for owner drawing cells. As such, they can also handle
hit detection and positioning of cell editing rectangles.
Render the whole item within an ObjectListView. This is only used in non-Details views.
The event
A Graphics for rendering
The bounds of the item
The model object to be drawn
Return true to indicate that the event was handled and no further processing is needed.
Render one cell within an ObjectListView when it is in Details mode.
The event
A Graphics for rendering
The bounds of the cell
The model object to be drawn
Return true to indicate that the event was handled and no further processing is needed.
What is under the given point?
x co-ordinate
y co-ordinate
This method should only alter HitTestLocation and/or UserData.
When the value in the given cell is to be edited, where should the edit rectangle be placed?
Renderers that implement this interface will have the filter property updated,
each time the filter on the ObjectListView is updated.
An AbstractRenderer is a do-nothing implementation of the IRenderer interface.
Render the whole item within an ObjectListView. This is only used in non-Details views.
The event
A Graphics for rendering
The bounds of the item
The model object to be drawn
Return true to indicate that the event was handled and no further processing is needed.
Render one cell within an ObjectListView when it is in Details mode.
The event
A Graphics for rendering
The bounds of the cell
The model object to be drawn
Return true to indicate that the event was handled and no further processing is needed.
What is under the given point?
x co-ordinate
y co-ordinate
This method should only alter HitTestLocation and/or UserData.
When the value in the given cell is to be edited, where should the edit rectangle be placed?
This class provides compatibility for v1 RendererDelegates
The renderer delegate that this renderer wraps
A BaseRenderer provides useful base level functionality for any custom renderer.
Subclasses will normally override the Render or OptionalRender method, and use the other
methods as helper functions.
Can the renderer wrap lines that do not fit completely within the cell?
Wrapping text doesn't work with the GDI renderer.
Gets or sets how many pixels will be left blank around this cell
This setting only takes effect when the control is owner drawn.
for more details.
Gets the horiztonal alignment of the column
Gets or sets how cells drawn by this renderer will be vertically aligned.
If this is not set, the value from the column or control itself will be used.
Gets the optional padding that this renderer should apply before drawing.
This property considers all possible sources of padding
Gets the vertical cell alignment that should govern the rendering.
This property considers all possible sources.
Gets or sets the image list from which keyed images will be fetched
When rendering multiple images, how many pixels should be between each image?
Should text be rendered using GDI routines? This makes the text look more
like a native List view control.
Get or set the aspect of the model object that this renderer should draw
What are the bounds of the cell that is being drawn?
Get or set the OLVColumn that this renderer will draw
Get/set the event that caused this renderer to be called
Get/set the event that caused this renderer to be called
Gets or sets the font to be used for text in this cell
Gets the image list from which keyed images will be fetched
Should this renderer fill in the background before drawing?
Cache whether or not our item is selected
Is this renderer being used on a printer context?
Get or set the listitem that this renderer will be drawing
Get/set the listview for which the drawing is to be done
Get the specialized OLVSubItem that this renderer is drawing
This returns null for column 0.
Get or set the model object that this renderer should draw
Get or set the list subitem that this renderer will be drawing
The brush that will be used to paint the text
Will this renderer use the custom images from the parent ObjectListView
to draw the checkbox images.
If this is true, the renderer will use the images from the
StateImageList to represent checkboxes. 0 - unchecked, 1 - checked, 2 - indeterminate.
If this is false (the default), then the renderer will use .NET's standard
CheckBoxRenderer.
Align the second rectangle with the first rectangle,
according to the alignment of the column
The cell's bounds
The rectangle to be aligned within the bounds
An aligned rectangle
Calculate the left edge of the rectangle that aligns the outer rectangle with the inner one
according to this renderer's horizontal alignment
Calculate the top of the rectangle that aligns the outer rectangle with the inner rectangle
according to this renders vertical alignment
Calculate the top of the rectangle that aligns the outer rectangle with a rectangle of the given height
according to this renderer's vertical alignment
Calculate the space that our rendering will occupy and then align that space
with the given rectangle, according to the Column alignment
Pre-padded bounds of the cell
Calculate the size of the content of this cell.
Pre-padded bounds of the cell
The width and height of the content
Calculate the bounds of a checkbox given the (pre-padded) cell bounds
Pre-padded cell bounds
How much space will the check box for this cell occupy?
Only column 0 can have check boxes. Sub item checkboxes are
treated as images
How much space will the check box for this row occupy?
If the list doesn't have checkboxes, or this isn't the primary column,
this returns an empty size.
How much horizontal space will the image of this cell occupy?
How much vertical space will the image of this cell occupy?
How much space will the image of this cell occupy?
How much horizontal space will the text of this cell occupy?
How much space will the text of this cell occupy?
Return the Color that is the background color for this item's cell
The background color of the subitem
Return the color of the background color when the item is selected
The background color of the subitem
Return the color to be used for text in this cell
The text color of the subitem
Return the color of the foreground color when the item is selected
The foreground color of the subitem
Return the image that should be drawn against this subitem
An Image or null if no image should be drawn.
Return the actual image that should be drawn when keyed by the given image selector.
An image selector can be:
- an int, giving the index into the image list
- a string, giving the image key into the image list
- an Image, being the image itself
The value that indicates the image to be used
An Image or null
Return the string that should be drawn within this
Return the Color that is the background color for this item's text
The background color of the subitem's text
Render the whole item in a non-details view.
Prepare this renderer to draw in response to the given event
Use this if you want to chain a second renderer within a primary renderer.
Render one cell
Prepare this renderer to draw in response to the given event
Use this if you want to chain a second renderer within a primary renderer.
Calculate which part of this cell was hit
Calculate the edit rectangle
Draw our data into the given rectangle using the given graphics context.
Subclasses should override this method.
The graphics context that should be used for drawing
The bounds of the subitem cell
Returns whether the rendering has already taken place.
If this returns false, the default processing will take over.
Draw our data into the given rectangle using the given graphics context.
Subclasses should override this method if they never want
to fall back on the default processing
The graphics context that should be used for drawing
The bounds of the subitem cell
Do the actual work of hit testing. Subclasses should override this rather than HitTest()
Handle a HitTest request after all state information has been initialized
Draw the standard "[checkbox] [image] [text]" cell after the state properties have been initialized.
Change the bounds of the given rectangle to take any cell padding into account
Perform normal hit testing relative to the given aligned content bounds
This method calculates the bounds of the text within a standard layout
(i.e. optional checkbox, optional image, text)
This method only works correctly if the state of the renderer
has been fully initialized (see BaseRenderer.GetEditRectangle)
Apply any padding to the given bounds, and then align a rectangle of the given
size within that padded area.
Draw the given image aligned horizontally within the column.
Over tall images are scaled to fit. Over-wide images are
truncated. This is by design!
Graphics context to use for drawing
Bounds of the cell
The image to be drawn
Draw our subitems image and text
Graphics context to use for drawing
Pre-padded bounds of the cell
Fill in the background of this cell
Graphics context to use for drawing
Bounds of the cell
Draw the primary check box of this row (checkboxes in other sub items use a different method)
Graphics context to use for drawing
The pre-aligned and padded target rectangle
Calculate the CheckBoxState we need to correctly draw the given state
Should this checkbox be drawn as disabled?
Is the current item hot (i.e. under the mouse)?
Is the mouse over a checkbox in this cell?
Draw the given text and optional image in the "normal" fashion
Graphics context to use for drawing
Bounds of the cell
The optional image to be drawn
Draw our subitems image and text
Graphics context to use for drawing
Bounds of the cell
Draw the given collection of image selectors
Draw the given text and optional image in the "normal" fashion
Graphics context to use for drawing
Bounds of the cell
The string to be drawn
Print the given text in the given rectangle using only GDI routines
The native list control uses GDI routines to do its drawing, so using them
here makes the owner drawn mode looks more natural.
This method doesn't honour the CanWrap setting on the renderer. All
text is single line
Gets the cell's vertical alignment as a TextFormatFlag
Gets the StringFormat needed when drawing text using GDI+
Print the given text in the given rectangle using normal GDI+ .NET methods
Printing to a printer dc has to be done using this method.
This renderer highlights substrings that match a given text filter.
Create a HighlightTextRenderer
Create a HighlightTextRenderer
Create a HighlightTextRenderer
Gets or set how rounded will be the corners of the text match frame
Gets or set the brush will be used to paint behind the matched substrings.
Set this to null to not fill the frame.
Gets or sets the filter that is filtering the ObjectListView and for
which this renderer should highlight text
When a filter changes, keep track of the text matching filters
Gets or set the pen will be used to frame the matched substrings.
Set this to null to not draw a frame.
Gets or sets whether the frame around a text match will have rounded corners
Gets or set the text that will be highlighted
Gets or sets the manner in which substring will be compared.
Use this to control if substring matches are case sensitive or insensitive.
Handle a HitTest request after all state information has been initialized
Draw text using GDI
Draw the highlighted text using GDI
Draw an indication around the given frame that shows a text match
Draw the text using GDI+
Draw the highlighted text using GDI+
Gets whether the renderer should actually draw highlighting
Return a GraphicPath that is a round cornered rectangle
A round cornered rectangle path
If I could rely on people using C# 3.0+, this should be
an extension method of GraphicsPath.
Return a GraphicPath that is a round cornered rectangle
The rectangle
The diameter of the corners
A round cornered rectangle path
If I could rely on people using C# 3.0+, this should be
an extension method of GraphicsPath.
This class maps a data value to an image that should be drawn for that value.
It is useful for drawing data that is represented as an enum or boolean.
Return a renderer that draw boolean values using the given images
Draw this when our data value is true
Draw this when our data value is false
A Renderer
Return a renderer that draw tristate boolean values using the given images
Draw this when our data value is true
Draw this when our data value is false
Draw this when our data value is null
A Renderer
Make a new empty renderer
Make a new renderer that will show the given image when the given key is the aspect value
The data value to be matched
The image to be shown when the key is matched
Make a new renderer that will show the given images when it receives the given keys
Build a renderer from the given array of keys and their matching images
An array of key/image pairs
Register the image that should be drawn when our Aspect has the data value.
Value that the Aspect must match
An ImageSelector -- an int, string or image
Render our value
Draw a collection of images
Draw one image
This renderer draws just a checkbox to match the check state of our model object.
Draw our cell
Handle the GetEditRectangle request
Handle the HitTest request
Render an image that comes from our data source.
The image can be sourced from:
- a byte-array (normally when the image to be shown is
stored as a value in a database)
- an int, which is treated as an index into the image list
- a string, which is treated first as a file name, and failing that as an index into the image list
- an ICollection of ints or strings, which will be drawn as consecutive images
If an image is an animated GIF, it's state is stored in the SubItem object.
By default, the image renderer does not render animations (it begins life with animations paused).
To enable animations, you must call Unpause().
In the current implementation (2009-09), each column showing animated gifs must have a
different instance of ImageRenderer assigned to it. You cannot share the same instance of
an image renderer between two animated gif columns. If you do, only the last column will be
animated.
Make an empty image renderer
Make an empty image renderer that begins life ready for animations
Finalizer
Should the animations in this renderer be paused?
Gets a timer that can be used to trigger redraws on animations
Pause any animations
Unpause any animations
Draw our image
Translate our Aspect into an image.
The strategy is:
- If its a byte array, we treat it as an in-memory image
- If it's an int, we use that as an index into our image list
- If it's a string, we try to load a file by that name. If we can't,
we use the string as an index into our image list.
An image
This is the method that is invoked by the timer. It basically switches control to the listview thread.
not used
This is the OnTimer callback, but invoked in the same thread as the creator of the ListView.
This method can use all of ListViews methods without creating a CrossThread exception.
Instances of this class kept track of the animation state of a single image.
Is the given image an animation
The image to be tested
Is the image an animation?
Create an AnimationState in a quiet state
Create an animation state for the given image, which may or may not
be an animation
The image to be rendered
Does this state represent a valid animation
Advance our images current frame and calculate when it will expire
Render our Aspect as a progress bar
Make a BarRenderer
Make a BarRenderer for the given range of data values
Make a BarRenderer using a custom bar scheme
Make a BarRenderer using a custom bar scheme
Make a BarRenderer that uses a horizontal gradient
Make a BarRenderer that uses a horizontal gradient
Should this bar be drawn in the system style?
How many pixels in from our cell border will this bar be drawn
What color will be used to fill the interior of the control before the
progress bar is drawn?
What color should the frame of the progress bar be?
How many pixels wide should the frame of the progress bar be?
What color should the 'filled in' part of the progress bar be?
This is only used if GradientStartColor is Color.Empty
Use a gradient to fill the progress bar starting with this color
Use a gradient to fill the progress bar ending with this color
Regardless of how wide the column become the progress bar will never be wider than this
Regardless of how high the cell is the progress bar will never be taller than this
The minimum data value expected. Values less than this will given an empty bar
The maximum value for the range. Values greater than this will give a full bar
The Pen that will draw the frame surrounding this bar
The brush that will be used to fill the bar
The brush that will be used to fill the background of the bar
Draw this progress bar using a gradient
Draw our aspect
Handle the GetEditRectangle request
An ImagesRenderer draws zero or more images depending on the data returned by its Aspect.
This renderer's Aspect must return a ICollection of ints, strings or Images,
each of which will be drawn horizontally one after the other.
As of v2.1, this functionality has been absorbed into ImageRenderer and this is now an
empty shell, solely for backwards compatibility.
A MultiImageRenderer draws the same image a number of times based on our data value
The stars in the Rating column of iTunes is a good example of this type of renderer.
Make a quiet renderer
Make an image renderer that will draw the indicated image, at most maxImages times.
The index of the image that should be drawn
The name of the image that should be drawn
The image selector that will give the image to be drawn
Like all image selectors, this can be an int, string or Image
What is the maximum number of images that this renderer should draw?
Values less than or equal to this will have 0 images drawn
Values greater than or equal to this will have MaxNumberImages images drawn
Draw our data value
A class to render a value that contains a bitwise-OR'ed collection of values.
Register the given image to the given value
When this flag is present...
...draw this image
Draw the flags
Do the actual work of hit testing. Subclasses should override this rather than HitTest()
This renderer draws an image, a single line title, and then multi-line description
under the title.
This class works best with FullRowSelect = true.
It's not designed to work with cell editing -- it will work but will look odd.
It's not RightToLeft friendly.
Create a DescribedTaskRenderer
Should text be rendered using GDI routines? This makes the text look more
like a native List view control.
Gets or set the font that will be used to draw the title of the task
If this is null, the ListView's font will be used
Return a font that has been set for the title or a reasonable default
Gets or set the color of the title of the task
This color is used when the task is not selected or when the listview
has a translucent selection mechanism.
Return the color of the title of the task or a reasonable default
Gets or set the font that will be used to draw the description of the task
If this is null, the ListView's font will be used
Return a font that has been set for the title or a reasonable default
Gets or set the color of the description of the task
This color is used when the task is not selected or when the listview
has a translucent selection mechanism.
Return the color of the description of the task or a reasonable default
Gets or sets the number of pixels that will be left between the image and the text
顶部留白像素
Gets or sets the number of pixels that will be left between the title and the description
Gets or sets the name of the aspect of the model object that contains the task description
Gets or sets the filter that is filtering the ObjectListView and for
which this renderer should highlight text
When a filter changes, keep track of the text matching filters
Fetch the description from the model class
Draw our item
Draw the task
Handle the HitTest request
This renderer draws a functioning button in its cell
Gets or sets how each button will be sized
Gets or sets the size of the button when the SizingMode is FixedBounds
If this is not set, the bounds of the cell will be used
Gets or sets the extra space that surrounds the cell when the SizingMode is TextBounds
Gets or sets the maximum width that a button can occupy.
-1 means there is no maximum width.
This is only considered when the SizingMode is TextBounds
Gets or sets the minimum width that a button can occupy.
-1 means there is no minimum width.
This is only considered when the SizingMode is TextBounds
获取或设置此列按钮的字体颜色(如果有按钮的话)
获取或设置此列按钮的背景颜色(如果有按钮的话)
获取或设置此列按钮的边框颜色(如果有按钮的话)
获取或设置此列按钮的内边框颜色(如果有按钮的话)
获取或设置此列按钮是否画边框(如果有按钮的话)
Calculate the size of the contents
Draw the button
What part of the control is under the given point?
What is the state of the button?
Is the mouse over the button?
The common interface supported by all style objects
Gets or set the font that will be used by this style
Gets or set the font style
Gets or sets the ForeColor
Gets or sets the BackColor
Basic implementation of IItemStyle
Gets or sets the font that will be applied by this style
Gets or sets the style of font that will be applied by this style
Gets or sets the color of the text that will be applied by this style
Gets or sets the background color that will be applied by this style
Instances of this class specify how should "hot items" (non-selected
rows under the cursor) be renderered.
Gets or sets the overlay that should be drawn as part of the hot item
Gets or sets the decoration that should be drawn as part of the hot item
A decoration is different from an overlay in that an decoration
scrolls with the listview contents, whilst an overlay does not.
This class defines how a cell should be formatted
Gets or sets the font that will be applied by this style
Gets or sets the style of font that will be applied by this style
Gets or sets the color of the text that will be applied by this style
Gets or sets the background color that will be applied by this style
Instances of this class describe how hyperlinks will appear
Create a HyperlinkStyle
What sort of formatting should be applied to hyperlinks in their normal state?
What sort of formatting should be applied to hyperlinks when the mouse is over them?
What sort of formatting should be applied to hyperlinks after they have been clicked?
Gets or sets the cursor that should be shown when the mouse is over a hyperlink.
Instances of this class control one the styling of one particular state
(normal, hot, pressed) of a header control
Gets or sets the font that will be applied by this style
Gets or sets the color of the text that will be applied by this style
Gets or sets the background color that will be applied by this style
Gets or sets the color in which a frame will be drawn around the header for this column
Gets or sets the width of the frame that will be drawn around the header for this column
This class defines how a header should be formatted in its various states.
Create a new HeaderFormatStyle
What sort of formatting should be applied to a column header when the mouse is over it?
What sort of formatting should be applied to a column header in its normal state?
What sort of formatting should be applied to a column header when pressed?
Set the font for all three states
Set the fore color for all three states
Set the back color for all three states
正常为选中按钮
获得焦点的按钮
鼠标经过样式
获得焦点并鼠标经过
自定义GDI工具,绘制按钮
绘制圆形按钮(用法同矩形按钮)
绘制圆角按钮
要绘制的文字
Graphics 对象
要填充的矩形
根据普通矩形得到圆角矩形的路径
原始矩形
半径
图形路径
A GlassPanelForm sits transparently over an ObjectListView to show overlays.
Get the low-level windows flag that will be given to CreateWindow.
Attach this form to the given ObjectListView
Made the overlay panel invisible
Show the overlay panel in its correctly location
If the panel is always shown, this method does nothing.
If the panel is being resized, this method also does nothing.
Detach this glass panel from its previous ObjectListView
You should unbind the overlay panel before making any changes to the
widget hierarchy.
Handle when the form that owns the ObjectListView begins to be resized
Handle when the form that owns the ObjectListView finished to be resized
The owning form has moved. Move the overlay panel too.
The owning form is resizing. Hide our overlay panel until the resizing stops
Handle when the bound OLV changes its location. The overlay panel must
be moved too, IFF it is currently visible.
Handle when the bound OLV changes size. The overlay panel must
resize too, IFF it is currently visible.
Handle when the bound OLV is part of a TabControl and that
TabControl changes tabs. The overlay panel is hidden. The
first time the bound OLV is redrawn, the overlay panel will
be shown again.
Somewhere the parent of the bound OLV has changed. Update
our events.
Handle when the bound OLV changes its visibility.
The overlay panel should match the OLV's visibility.
Class used to capture window messages for the header of the list view
control.
Create a header control for the given ObjectListView.
Return the index of the column under the current cursor position,
or -1 if the cursor is not over a column
Index of the column under the cursor, or -1
返回此控件的Windows句柄
当ObjectListView被初始化为UserControl的一部分时,GetHeaderControl()方法返回0,直到UserControl完全初始化。
因此,构造函数中的AssignHandle()调用不起作用。因此,我们覆盖了Handle属性,以便值始终为当前值。
Gets or sets a style that should be applied to the font of the
column's header text when the mouse is over that column
THIS IS EXPERIMENTAL. USE AT OWN RISK. August 2009
如果光标位于其复选框上,则获取光标下列的索引
Gets the client rectangle for the header
如果给定坐标点在给定列的复选框上方,则返回TRUE。
获取光标是否位于“锁定”的分隔线上,即用户无法拖动的分隔线。
获取或设置此标头所属的列表视图
获取标题的最大高度。-1表示没有最大值。
获取标题的最小高度。-1表示没有最低要求。
Get or set the ToolTip that shows tips for the header
获取或设置当列标题中的文本太长而无法放入列中时,是否应对其进行自动换行
Calculate how height the header needs to be
Height in pixels
Get the bounds of the checkbox against the given column
Should the given column be drawn with a checkbox against it?
Should the given column show a sort indicator?
Should the given column be drawn with a filter indicator against it?
Should the given column show a non-themed sort indicator?
Return the bounds of the item with the given index
Return the bounds within which the given column will be drawn
Force the header to redraw by invalidating it
Force the header to redraw a single column by invalidating it
Create a native tool tip control for this listview
Override the basic message pump
Handle the LButtonDown windows message
Handle the LButtonUp windows message
Handle the SetCursor windows message
Handle the MouseMove windows message
Handle the MouseLeave windows message
Handle the Notify windows message
Handle the CustomDraw windows message
The message divides a ListView's space between the header and the rows of the listview.
The WINDOWPOS structure controls the headers bounds, the RECT controls the listview bounds.
Handle when the underlying header control is destroyed
Does this header need to be custom drawn?
Word wrapping and colored text require custom drawning. Funnily enough, we
can change the font natively.
Draw one cell of the header
Draw a background for the header, without using Themes.
Draw a more-or-less pure themed header background.
Draw a sort indicator using themes
Draw a sort indicator without using themes
Draw an indication that this column has a filter applied to it
Draw the header's image and text
Return the header format that should be used for the given column
What style should be applied to the header?
What font should be used to draw the header text?
What flags will be used when drawing text
Perform a HitTest for the header control
Null if the given point isn't over the header
Instances of this class put a CheckedListBox into a tool strip menu item.
Create a ToolStripCheckedListBox
Gets the control embedded in the menu
Gets the items shown in the checkedlistbox
Gets or sets whether an item should be checked when it is clicked
Gets a collection of the checked items
Add a possibly checked item to the control
Add an item with the given state to the control
Gets the checkedness of the i'th item
Set the checkedness of the i'th item
Check all the items in the control
Unchecked all the items in the control
Listen for events on the underlying control
Stop listening for events on the underlying control
Tell the world that an item was checked
Trigger the ItemCheck event
A limited wrapper around a Windows tooltip window.
These are the standard icons that a tooltip can display.
No icon
Info
Warning
Error
Large info (Vista and later only)
Large warning (Vista and later only)
Large error (Vista and later only)
Get or set if the style of the tooltip control
Get or set if the tooltip should be shown as a ballon
Get or set if the tooltip should be shown as a ballon
Get or set the background color of the tooltip
Get or set the color of the text and border on the tooltip.
Get or set the title that will be shown on the tooltip.
Get or set the icon that will be shown on the tooltip.
Gets or sets the font that will be used to draw this control.
is still.
Setting this to null reverts to the default font.
Gets or sets how many milliseconds the tooltip will remain visible while the mouse
is still.
Gets or sets how many milliseconds the mouse must be still before the tooltip is shown.
Gets or sets how many milliseconds the mouse must be still before the tooltip is shown again.
Create the underlying control.
The parent of the tooltip
This does nothing if the control has already been created
Take a copy of the current settings and restore them when the
tooltip is poppped.
This call cannot be nested. Subsequent calls to this method will be ignored
until PopSettings() is called.
Restore the settings of the tooltip as they were when PushSettings()
was last called.
Add the given window to those for whom this tooltip will show tips
The window
Hide any currently visible tooltip
Remove the given window from those managed by this tooltip
Set the maximum width of a tooltip string.
Set the maximum width of a tooltip string.
Setting this ensures that line breaks in the tooltip are honoured.
Make a TOOLINFO structure for the given window
A filled in TOOLINFO
Handle a WmNotify message
The msg
True if the message has been handled
Handle a get display info message
The msg
True if the message has been handled
Handle a TTN_LINKCLICK message
The msg
True if the message has been handled
This cannot call base.WndProc() since the msg may have come from another control.
Handle a TTN_POP message
The msg
True if the message has been handled
This cannot call base.WndProc() since the msg may have come from another control.
Handle a TTN_SHOW message
The msg
True if the message has been handled
This cannot call base.WndProc() since the msg may have come from another control.
Handle a reflected notify message
The msg
True if the message has been handled
Mess with the basic message pump of the tooltip
Tell the world that a tooltip is about to show
Tell the world that a tooltip is about to disappear
This form is an example of how an application could allows the user to select which columns
an ObjectListView will display, as well as select which order the columns are displayed in.
In Tile view, ColumnHeader.DisplayIndex does nothing. To reorder the columns you have
to change the order of objects in the Columns property.
Remember that the first column is special!
It has to remain the first column.
Make a new ColumnSelectionForm
Open this form so it will edit the columns that are available in the listview's current view
The ObjectListView whose columns are to be altered
Open this form so it will edit the columns that are available in the given listview
when the listview is showing the given type of view.
The ObjectListView whose columns are to be altered
The view that is to be altered. Must be View.Details or View.Tile
Initialize the form to show the columns of the given view
The user has pressed OK. Do what's requied.
Enable the controls on the dialog to match the current state
A Comparer that will sort a list of columns so that visible ones come before hidden ones,
and that are ordered by their display order.
Required designer variable.
Clean up any resources being used.
true if managed resources should be disposed; otherwise, false.
Required method for Designer support - do not modify
the contents of this method with the code editor.
An object that implements the IGenerator interface provides the ability
to dynamically create columns
for an ObjectListView based on the characteristics of a given collection
of model objects.
Generate columns into the given ObjectListView that come from the given
model object type.
The ObjectListView to modify
The model type whose attributes will be considered.
Will columns be generated for properties that are not marked with [OLVColumn].
Generate a list of OLVColumns based on the attributes of the given type
If allProperties to true, all public properties will have a matching column generated.
If allProperties is false, only properties that have a OLVColumn attribute will have a column generated.
Will columns be generated for properties that are not marked with [OLVColumn].
A collection of OLVColumns matching the attributes of Type that have OLVColumnAttributes.
The Generator class provides methods to dynamically create columns
for an ObjectListView based on the characteristics of a given collection
of model objects.
For a given type, a Generator can create columns to match the public properties
of that type. The generator can consider all public properties or only those public properties marked with
[OLVColumn] attribute.
Gets or sets the actual generator used by the static convinence methods.
If you subclass the standard generator or implement IGenerator yourself,
you should install an instance of your subclass/implementation here.
Replace all columns of the given ObjectListView with columns generated
from the first member of the given enumerable. If the enumerable is
empty or null, the ObjectListView will be cleared.
The ObjectListView to modify
The collection whose first element will be used to generate columns.
Replace all columns of the given ObjectListView with columns generated
from the first member of the given enumerable. If the enumerable is
empty or null, the ObjectListView will be cleared.
The ObjectListView to modify
The collection whose first element will be used to generate columns.
Will columns be generated for properties that are not marked with [OLVColumn].
Generate columns into the given ObjectListView that come from the public properties of the given
model object type.
The ObjectListView to modify
The model type whose attributes will be considered.
Generate columns into the given ObjectListView that come from the public properties of the given
model object type.
The ObjectListView to modify
The model type whose attributes will be considered.
Will columns be generated for properties that are not marked with [OLVColumn].
Generate a list of OLVColumns based on the public properties of the given type
that have a OLVColumn attribute.
A collection of OLVColumns matching the attributes of Type that have OLVColumnAttributes.
Generate columns into the given ObjectListView that come from the given
model object type.
The ObjectListView to modify
The model type whose attributes will be considered.
Will columns be generated for properties that are not marked with [OLVColumn].
Generate a list of OLVColumns based on the attributes of the given type
If allProperties to true, all public properties will have a matching column generated.
If allProperties is false, only properties that have a OLVColumn attribute will have a column generated.
Will columns be generated for properties that are not marked with [OLVColumn].
A collection of OLVColumns matching the attributes of Type that have OLVColumnAttributes.
Replace all the columns in the given listview with the given list of columns.
Post process columns after creating them and adding them to the AllColumns collection.
Create a column from the given PropertyInfo and OLVColumn attribute
Make a column from the given PropertyInfo
Make a column from the given PropertyDescriptor
Create a column with all the given information
Create a column.
Convert a property name to a displayable title.
Configure the given column to show a checkbox if appropriate
If this given type has an property marked with [OLVChildren], make delegates that will
traverse that property as the children of an instance of the model
Generate CanExpand and ChildrenGetter delegates from the given property.
An OLVExporter converts a collection of rows from an ObjectListView
into a variety of textual formats.
What format will be used for exporting
Tab separated values, according to http://www.iana.org/assignments/media-types/text/tab-separated-values
Alias for TabSeparated
Comma separated values, according to http://www.ietf.org/rfc/rfc4180.txt
HTML table, according to me
Create an empty exporter
Create an exporter that will export all the rows of the given ObjectListView
Create an exporter that will export all the given rows from the given ObjectListView
Gets or sets whether hidden columns will also be included in the textual
representation. If this is false (the default), only visible columns will
be included.
Gets or sets whether column headers will also be included in the text
and HTML representation. Default is true.
Gets the ObjectListView that is being used as the source of the data
to be exported
Gets the model objects that are to be placed in the data object
Export the nominated rows from the nominated ObjectListView.
Returns the result in the expected format.
This will perform only one conversion, even if called multiple times with different formats.
Convert
Encode a string such that it can be used as a value in a CSV file.
This basically means replacing any quote mark with two quote marks,
and enclosing the whole string in quotes.
HTML-encodes a string and returns the encoded string.
The text string to encode.
The HTML-encoded text.
Taken from http://www.west-wind.com/weblog/posts/2009/Feb/05/Html-and-Uri-String-Encoding-without-SystemWeb
A TypedObjectListView is a type-safe wrapper around an ObjectListView.
VCS does not support generics on controls. It can be faked to some degree, but it
cannot be completely overcome. In our case in particular, there is no way to create
the custom OLVColumn's that we need to truly be generic. So this wrapper is an
experiment in providing some type-safe access in a way that is useful and available today.
A TypedObjectListView is not more efficient than a normal ObjectListView.
Underneath, the same name of casts are performed. But it is easier to use since you
do not have to write the casts yourself.
The class of model object that the list will manage
To use a TypedObjectListView, you write code like this:
TypedObjectListView<Person> tlist = new TypedObjectListView<Person>(this.listView1);
tlist.CheckStateGetter = delegate(Person x) { return x.IsActive; };
tlist.GetColumn(0).AspectGetter = delegate(Person x) { return x.Name; };
...
To iterate over the selected objects, you can write something elegant like this:
foreach (Person x in tlist.SelectedObjects) {
x.GrantSalaryIncrease();
}
Create a typed wrapper around the given list.
The listview to be wrapped
Return the model object that is checked, if only one row is checked.
If zero rows are checked, or more than one row, null is returned.
Return the list of all the checked model objects
The ObjectListView that is being wrapped
Get or set the list of all model objects
Return the model object that is selected, if only one row is selected.
If zero rows are selected, or more than one row, null is returned.
The list of model objects that are selected.
Return a typed wrapper around the column at the given index
The index of the column
A typed column or null
Return a typed wrapper around the column with the given name
The name of the column
A typed column or null
Return the model object at the given index
The index of the model object
The model object or null
CheckStateGetter
Gets or sets the check state getter
BooleanCheckStateGetter
Gets or sets the boolean check state getter
CheckStatePutter
Gets or sets the check state putter delegate
BooleanCheckStatePutter
Gets or sets the boolean check state putter
ToolTipGetter
Gets or sets the cell tooltip getter
Gets or sets the header tool tip getter
This method will generate AspectGetters for any column that has an AspectName.
A type-safe wrapper around an OLVColumn
Creates a TypedColumn
Generate an aspect getter that does the same thing as the AspectName,
except without using reflection.
If you have an AspectName of "Owner.Address.Postcode", this will generate
the equivilent of: this.AspectGetter = delegate (object x) {
return x.Owner.Address.Postcode;
}
If AspectName is empty, this method will do nothing, otherwise
this will replace any existing AspectGetter.
Generates an aspect getter method dynamically. The method will execute
the given dotted chain of selectors against a model object given at runtime.
The type of model object to be passed to the generated method
A dotted chain of selectors. Each selector can be the name of a
field, property or parameter-less method.
A typed delegate
This method generates the actual IL for the method.
A virtual object list view operates in virtual mode, that is, it only gets model objects for
a row when it is needed. This gives it the ability to handle very large numbers of rows with
minimal resources.
A listview is not a great user interface for a large number of items. But if you've
ever wanted to have a list with 10 million items, go ahead, knock yourself out.
Virtual lists can never iterate their contents. That would defeat the whole purpose.
Animated GIFs should not be used in virtual lists. Animated GIFs require some state
information to be stored for each animation, but virtual lists specifically do not keep any state information.
In any case, you really do not want to keep state information for 10 million animations!
Although it isn't documented, .NET virtual lists cannot have checkboxes. This class codes around this limitation,
but you must use the functions provided by ObjectListView: CheckedObjects, CheckObject(), UncheckObject() and their friends.
If you use the normal check box properties (CheckedItems or CheckedIndicies), they will throw an exception, since the
list is in virtual mode, and .NET "knows" it can't handle checkboxes in virtual mode.
Due to the limits of the underlying Windows control, virtual lists do not trigger ItemCheck/ItemChecked events.
Use a CheckStatePutter instead.
To enable grouping, you must provide an implmentation of IVirtualGroups interface, via the GroupingStrategy property.
Similarly, to enable filtering on the list, your VirtualListDataSource must also implement the IFilterableDataSource interface.
Create a VirtualObjectListView
Gets whether or not this listview is capabale of showing groups
Get or set the collection of model objects that are checked.
When setting this property, any row whose model object isn't
in the given collection will be unchecked. Setting to null is
equivilent to unchecking all.
This property returns a simple collection. Changes made to the returned
collection do NOT affect the list. This is different to the behaviour of
CheckedIndicies collection.
When getting CheckedObjects, the performance of this method is O(n) where n is the number of checked objects.
When setting CheckedObjects, the performance of this method is O(n) where n is the number of checked objects plus
the number of objects to be checked.
If the ListView is not currently showing CheckBoxes, this property does nothing. It does
not remember any check box settings made.
This class optimizes the management of CheckStates so that it will work efficiently even on
large lists of item. However, those optimizations are impossible if you install a CheckStateGetter.
With a CheckStateGetter installed, the performance of this method is O(n) where n is the size
of the list. This could be painfully slow.
Gets or sets whether or not an object will be included in the CheckedObjects
collection, even if it is not present in the control at the moment
This property is an implementation detail and should not be altered.
Gets the collection of objects that survive any filtering that may be in place.
Gets or sets the strategy that will be used to create groups
This must be provided for a virtual list to show groups.
Gets whether or not the current list is filtering its contents
This is only possible if our underlying data source supports filtering.
Get/set the collection of objects that this list will show
The contents of the control will be updated immediately after setting this property.
Setting this property preserves selection, if possible. Use SetObjects() if
you do not want to preserve the selection. Preserving selection is the slowest part of this
code -- performance is O(n) where n is the number of selected rows.
This method is not thread safe.
The property DOES work on virtual lists, but if you try to iterate through a list
of 10 million objects, it may take some time :)
This delegate is used to fetch a rowObject, given it's index within the list
Only use this property if you are not using a VirtualListDataSource.
Should this list show its items in groups?
Get/set the data source that is behind this virtual list
Setting this will cause the list to redraw.
Gets or sets the number of rows in this virtual list.
There is an annoying feature/bug in the .NET ListView class.
When you change the VirtualListSize property, it always scrolls so
that the focused item is the top item. This is annoying since it makes
the virtual list seem to flicker as the control scrolls to show the focused
item and then scrolls back to where ObjectListView wants it to be.
Return the number of items in the list
the number of items in the list
Return the model object at the given index
Index of the model object to be returned
A model object
Find the given model object within the listview and return its index
The model object to be found
The index of the object. -1 means the object was not present
Return the OLVListItem that displays the given model object
The modelObject whose item is to be found
The OLVListItem that displays the model, or null
This method has O(n) performance.
Add the given collection of model objects to this control.
A collection of model objects
The added objects will appear in their correct sort position, if sorting
is active. Otherwise, they will appear at the end of the list.
No check is performed to see if any of the objects are already in the ListView.
Null objects are silently ignored.
Remove all items from this list
This method can safely be called from background threads.
Scroll the listview so that the given group is at the top.
The index of the group to be revealed
If the group is already visible, the list will still be scrolled to move
the group to the top, if that is possible.
This only works when the list is showing groups (obviously).
Inserts the given collection of model objects to this control at hte given location
A collection of model objects
The added objects will appear in their correct sort position, if sorting
is active. Otherwise, they will appear at the given position of the list.
No check is performed to see if any of the objects are already in the ListView.
Null objects are silently ignored.
Update the rows that are showing the given objects
This method does not resort the items.
Update the rows that are selected
This method does not resort or regroup the view.
Remove all of the given objects from the control
Collection of objects to be removed
Nulls and model objects that are not in the ListView are silently ignored.
Due to problems in the underlying ListView, if you remove all the objects from
the control using this method and the list scroll vertically when you do so,
then when you subsequenially add more objects to the control,
the vertical scroll bar will become confused and the control will draw one or more
blank lines at the top of the list.
Select the row that is displaying the given model object. All other rows are deselected.
Model object to select
Should the object be focused as well?
Select the rows that is displaying any of the given model object. All other rows are deselected.
A collection of model objects
This method has O(n) performance where n is the number of model objects passed.
Do not use this to select all the rows in the list -- use SelectAll() for that.
Set the collection of objects that this control will show.
Should the state of the list be preserved as far as is possible.
Get the checkedness of an object from the model. Returning null means the
model does know and the value from the control will be used.
Rebuild the list with its current contents.
Invalidate any cached information when we rebuild the list.
Clear any cached info this list may have been using
Do the work of creating groups for this control
Do the plumbing to disable groups on a virtual list
Do the plumbing to enable groups on a virtual list
Return the position of the given itemIndex in the list as it currently shown to the user.
If the control is not grouped, the display order is the same as the
sorted list order. But if the list is grouped, the display order is different.
Return the last item in the order they are shown to the user.
If the control is not grouped, the display order is the same as the
sorted list order. But if the list is grouped, the display order is different.
Return the n'th item (0-based) in the order they are shown to the user.
If the control is not grouped, the display order is the same as the
sorted list order. But if the list is grouped, the display order is different.
Return the ListViewItem that appears immediately after the given item.
If the given item is null, the first item in the list will be returned.
Return null if the given item is the last item.
The item that is before the item that is returned, or null
A OLVListItem
Return the ListViewItem that appears immediately before the given item.
If the given item is null, the last item in the list will be returned.
Return null if the given item is the first item.
The item that is before the item that is returned
A ListViewItem
Make a list of groups that should be shown according to the given parameters
Create a OLVListItem for given row index
The index of the row that is needed
An OLVListItem
On virtual lists, this cannot work.
Record the change of checkstate for the given object in the model.
This does not update the UI -- only the model
The check state that was recorded and that should be used to update
the control.
Refresh the given item in the list
The item to refresh
Change the size of the list
Take ownership of the 'objects' collection. This separates our collection from the source.
This method
separates the 'objects' instance variable from its source, so that any AddObject/RemoveObject
calls will modify our collection and not the original colleciton.
VirtualObjectListViews always own their collections, so this is a no-op.
Change the state of the control to reflect changes in filtering
Change the size of the virtual list so that it matches its data source
Handle the CacheVirtualItems event
Handle a RetrieveVirtualItem
Handle the SearchForVirtualList event, which is called when the user types into a virtual list
Find the first row in the given range of rows that prefix matches the string value of the given column.
The index of the matched row, or -1
获取颜色
颜色变化时激发
Required designer variable.
Clean up any resources being used.
true if managed resources should be disposed; otherwise, false.
Required method for Designer support - do not modify
the contents of this method with the code editor.