Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataGrid卡顿问题 #32

Closed
sillsun opened this issue Nov 15, 2019 · 5 comments
Closed

DataGrid卡顿问题 #32

sillsun opened this issue Nov 15, 2019 · 5 comments

Comments

@sillsun
Copy link

sillsun commented Nov 15, 2019

PanuonUI的DataGrid要比原生的DataGrid卡很多。

绑定相同的DataTabel时,滚动或DataGrid或者DataGrid绑定对象发生变化时,PanuonUI会不断打印出以下错误:
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.DataGrid', AncestorLevel='1''. BindingExpression:Path=FontSize; DataItem=null; target element is 'DataGridCell' (Name=''); target property is 'FontSize' (type 'Double')

System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.DataGrid', AncestorLevel='1''. BindingExpression:Path=(0); DataItem=null; target element is 'DataGridCell' (Name=''); target property is 'CellPadding' (type 'Thickness')

System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.DataGrid', AncestorLevel='1''. BindingExpression:Path=(0); DataItem=null; target element is 'DataGridCell' (Name=''); target property is 'ColumnVerticalContentAlignment' (type 'VerticalAlignment')

System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.DataGrid', AncestorLevel='1''. BindingExpression:Path=(0); DataItem=null; target element is 'DataGridCell' (Name=''); target property is 'ColumnHorizontalContentAlignment' (type 'HorizontalAlignment')

System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.DataGrid', AncestorLevel='1''. BindingExpression:Path=(0); DataItem=null; target element is 'DataGridCell' (Name=''); target property is 'SelectedBackground' (type 'Brush')

如果是WPF原生的DataGrid是不会有这样的情况。

@Mochengvia
Copy link
Owner

感谢反馈。
我会在下周验证这个问题。

1 similar comment
@Mochengvia
Copy link
Owner

感谢反馈。
我会在下周验证这个问题。

@Uhifon
Copy link

Uhifon commented Nov 19, 2019

我刚看了,确实有这个问题,报这些错,但是功能正常

@sillsun
Copy link
Author

sillsun commented Nov 20, 2019

我刚看了,确实有这个问题,报这些错,但是功能正常

是的,虽然功能正常,但是拖动导航条,或者ItemsSource绑定对象的时候卡顿比较明显。300行不到的数据就会感到明显卡顿。我一开始以为是数据太多的问题,但直接用WPF原生控件就完全没问题。

@Mochengvia
Copy link
Owner

目前确实发现了DataGrid的一些问题。这个问题需要对现有的代码进行大量更改。
我只能把这个任务延申到2.0中修复。预计下月将发布beta版本。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants