[GcSpreadGrid] フィルタのドロップダウンリストの表示速度を向上する方法
対象製品
SPREAD for WPF 3.0J
詳細
列ヘッダのフィルタのアイコンをクリックして、ドロップダウンリストが表示されるまでの速度は、AutoFilterListBoxのScrollViewer.CanContentScrollを有効にすることで、向上させることが可能です。
App.xaml(Application.xaml)で次のように設定することで有効になります。
◎サンプルコード(XAML)
App.xaml(Application.xaml)で次のように設定することで有効になります。
◎サンプルコード(XAML)
<Application x:Class="FilterSample.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:FilterSample" xmlns:sgp="clr-namespace:GrapeCity.Windows.SpreadGrid.Presenters;assembly=GrapeCity.WPF.SpreadGrid" StartupUri="MainWindow.xaml"> <Application.Resources> <Style TargetType="{x:Type sgp:AutoFilterListBox}"> <Style.Setters> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type sgp:AutoFilterListBox}"> <Border Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true" Padding="1"> <ScrollViewer Padding="{TemplateBinding Padding}" Focusable="false" CanContentScroll="True"> <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> </ScrollViewer> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style.Setters> </Style> </Application.Resources> </Application>