作成日: 2026/06/24 最終更新日: 2026/06/24
文書種別
使用方法
詳細
列ヘッダのフィルタのアイコンをクリックして、ドロップダウンリストが表示されるまでの速度は、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>