【发布时间】:2016-03-03 20:38:17
【问题描述】:
我在理解 wpf 的 syncfusion 库时遇到问题。更具体地说,它是关于 sfDataGrid 控件的。我的应用程序中的此控件位于标准 WPF ScrollView 控件中。所以,问题是,每当我悬停 sfDataGrid 时,它都会发生滚动事件并且滚动本身不起作用。所以有什么问题?最好的解决方案是什么?
【问题讨论】:
标签: c# wpf syncfusion
我在理解 wpf 的 syncfusion 库时遇到问题。更具体地说,它是关于 sfDataGrid 控件的。我的应用程序中的此控件位于标准 WPF ScrollView 控件中。所以,问题是,每当我悬停 sfDataGrid 时,它都会发生滚动事件并且滚动本身不起作用。所以有什么问题?最好的解决方案是什么?
【问题讨论】:
标签: c# wpf syncfusion
SfDataGrid 有自己的 ScrollViewer。因此不建议在 ScrollViewer 中加载 SfDataGrid,因为它为其子级提供了无限大小,这会导致 UI 虚拟化丢失。在 ScrollViewer 中加载 SfDataGrid 时,SfDataGrid 的 ScollViewer 被禁用。但是,您可以通过在 ScollViewer 中加载时设置 SfDataGrid 的高度来克服这个问题。
<ScrollViewer>
<Syncfusion:SfDataGrid x:Name="dataGrid"
Height="600"
AutoGenerateColumns="True"
ItemsSource="{Binding Source}" />
</ScrollViewer>
-Thangapriya,Syncfusion 软件。
【讨论】: