积极答复者
wpf toolkit 中的datagrid不能用,用了会出现vs设计模式下的死机!

问题
-
代码: <dg:DataGrid Name="dataGrid" AutoGenerateColumns="False"
ItemsSource="{Binding }">
<dg:DataGrid.Columns>
<dg:DataGridTextColumn Header="Name"
Binding="{Binding Path=name}"/> --></dg:DataGrid.Columns>
</dg:DataGrid>我把相同绑定的前后端代码放到另外的自己建立的测试项目中却是可以用的,就在我们工作上的项目解决方案中不能使用,很奇怪, <dg:DataGrid Name="dataGrid" AutoGenerateColumns="False"
ItemsSource="{Binding }">
<dg:DataGrid.Columns>--一旦加入下面这个DataGridTextColumn就会在设计模式上出现很长的一条,然后vs死掉,不单是DataGridTextColumn其他任何Columns下的元素加进去都会死掉,这为啥?新建的其他项目相同代码可以正常实行,是不是本来的项目中加了什么引用导致错误?
<dg:DataGridTextColumn Header="Name"
Binding="{Binding Path=name}"/> --></dg:DataGrid.Columns>
</dg:DataGrid>
答案
-
你都用上了Visual Studio 2010 WPF 4了,为什么还要用Toolkit里面的DataGrid。 WPF产品组已经将Toolkit里面的DataGrid release 到了.Net 4中。并且还优化了性能和修复了一些Bug。
所以,.Net 4 WPF 4 就可以不用Toolkit里的DataGrid了。 参见: http://social.msdn.microsoft.com/Forums/zh-CN/wpfzhchs/thread/dc853cd4-e783-4929-8ed0-85a7640b69e0
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 a013strife 2011年9月19日 5:34
-
说实话 ,好的都是要钱的.免费的大部分都是自愿者自己开发的. 你可以去Codeplex.com 用WPF关键词搜一下,有很多。 推荐其中 http://wpftoolkit.codeplex.com/
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 a013strife 2011年9月19日 5:35
-
发现这个问题很怪,视图状态显示控件会让vs崩溃,去掉视图状态后直接运行代码可以正常显示,ms关于wpftoolkit的bug...只能这么认为了
- 已标记为答案 a013strife 2011年9月19日 5:34
-
找到原因了,留下解决方法是个好习惯:
app.xaml中定义的button式样没有给x:key赋值,默认button都继承这样的式样了,导致wpftoolkit崩溃,加上x:key后不再崩溃,这个就是原因!
- 已标记为答案 a013strife 2011年9月20日 8:08
全部回复
-
你都用上了Visual Studio 2010 WPF 4了,为什么还要用Toolkit里面的DataGrid。 WPF产品组已经将Toolkit里面的DataGrid release 到了.Net 4中。并且还优化了性能和修复了一些Bug。
所以,.Net 4 WPF 4 就可以不用Toolkit里的DataGrid了。 参见: http://social.msdn.microsoft.com/Forums/zh-CN/wpfzhchs/thread/dc853cd4-e783-4929-8ed0-85a7640b69e0
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 a013strife 2011年9月19日 5:34
-
说实话 ,好的都是要钱的.免费的大部分都是自愿者自己开发的. 你可以去Codeplex.com 用WPF关键词搜一下,有很多。 推荐其中 http://wpftoolkit.codeplex.com/
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 a013strife 2011年9月19日 5:35
-
发现这个问题很怪,视图状态显示控件会让vs崩溃,去掉视图状态后直接运行代码可以正常显示,ms关于wpftoolkit的bug...只能这么认为了
- 已标记为答案 a013strife 2011年9月19日 5:34
-
找到原因了,留下解决方法是个好习惯:
app.xaml中定义的button式样没有给x:key赋值,默认button都继承这样的式样了,导致wpftoolkit崩溃,加上x:key后不再崩溃,这个就是原因!
- 已标记为答案 a013strife 2011年9月20日 8:08