请问ListView的列的坐标咋算
1、2、3、4、5、6、7、列的坐标,
1、2、3、4、5、6、7、列的坐标,
解决方案 »
- ilasm 汇编一段程序出错!熟悉的来看看解决下!
- 万能的CSDNER!!请进来帮我看下gridview的取值问题
- C#中有ACDSEE一样的控件吗?
- WinForm中 ToolStrip.OverflowButton 的外观(文字或图片)如何设置并生效
- class1 转化为 CLASS2
- aspnet_wp.exe 占CPU100%
- 请教高手们,DataGrid的打印问题,在线等。
- 求助:程序退出时线程无法销毁
- 请思归大哥当我用DataGrid 绑定含有父表和子表的DataSet时如何始父表,和子表都可以修改,但都不能增加记录(即不显示有*的那一行就行)
- C#如何获取静态类的调用者?
- vs2010 professional 和vs2010 express,有啥不同
- 新手问题~问下如何个ComboBox设置value.
//限定列宽度
public class FixedWidthColumn : GridViewColumn {
static FixedWidthColumn() {
WidthProperty.OverrideMetadata(typeof(FixedWidthColumn),
new FrameworkPropertyMetadata(null, new CoerceValueCallback(OnCoerceWidth)));
}
private static object OnCoerceWidth(DependencyObject o, object baseValue) {
return baseValue;
}
}public double FixedWidth {
get { return (double)GetValue(FixedWidthProperty); }
set { SetValue(FixedWidthProperty, value); }
}
public static readonly DependencyProperty FixedWidthProperty =
DependencyProperty.Register(
"FixedWidth",
typeof(double),
typeof(FixedWidthColumn),
new FrameworkPropertyMetadata(double.NaN, new PropertyChangedCallback(OnFixedWidthChanged)));
private static void OnFixedWidthChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) {
FixedWidthColumn fwc = o as FixedWidthColumn;
if (fwc != null)
fwc.CoerceValue(WidthProperty);
}
private static object OnCoerceWidth(DependencyObject o, object baseValue) {
FixedWidthColumn fwc = o as FixedWidthColumn;
if (fwc != null)
return fwc.FixedWidth;
return baseValue;
}然后在需要的地方调用这些方法就OK了!
还有WidthProperty.OverrideMetadata在MSDN没找到这个属性呢?