I have a custom filtering control with a strange behavior using the mouse scroll wheel.
If I use the theme property on the distinct values ListBox (OfficeBlack theme) one tick on the mouse wheel will scroll down half way in the list and one more tick will scroll all the way down. But the list contains 300 records!
If I remove the theme property I will have to spin the wheel several times before it even starts to scroll my list.
But when it actually starts to scroll it scrolls the list fine, not all the way down at once.
The amount of time I have to scroll seems to be related to the number of rows in the data grid behind, so it seems it is scrolling the grid first (but invisible) then when it reaches bottom of grid, the filter list will start to scroll.
Here is my template for the filtering control:
When I don't use a custom filtering control the behavior is almost the same, it will scroll all the way down in one tick on the wheel and when at the bottom of the list, the grid behind will start to scroll, even though the mouse is still over the filtering control.
I'm using the last Silverlight 4 version, is this something that is fixed later or have I done something wrong?
Regards,
HÃ¥kan
If I use the theme property on the distinct values ListBox (OfficeBlack theme) one tick on the mouse wheel will scroll down half way in the list and one more tick will scroll all the way down. But the list contains 300 records!
If I remove the theme property I will have to spin the wheel several times before it even starts to scroll my list.
But when it actually starts to scroll it scrolls the list fine, not all the way down at once.
The amount of time I have to scroll seems to be related to the number of rows in the data grid behind, so it seems it is scrolling the grid first (but invisible) then when it reaches bottom of grid, the filter list will start to scroll.
Here is my template for the filtering control:
<
ControlTemplate
x:Key
=
"FilteringControlTemplate"
TargetType
=
"telerik:FilteringControl"
>
<
Border
BorderThickness
=
"{TemplateBinding BorderThickness}"
Margin
=
"{TemplateBinding Margin}"
CornerRadius
=
"1"
BorderBrush
=
"{TemplateBinding BorderBrush}"
>
<
Border
BorderBrush
=
"{StaticResource ControlInnerBorder}"
BorderThickness
=
"1"
Background
=
"{TemplateBinding Background}"
>
<
Grid
>
<
StackPanel
x:Name
=
"PART_DistinctFilterPanel"
Margin
=
"{TemplateBinding Padding}"
VerticalAlignment
=
"{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment
=
"{TemplateBinding HorizontalContentAlignment}"
Loaded
=
"PART_DistinctFilterPanel_Loaded"
>
<
StackPanel
x:Name
=
"PART_DistinctFilter"
Visibility
=
"{TemplateBinding DistinctFiltersVisibility}"
>
<
CheckBox
x:Name
=
"PART_SelectAllCheckBox"
IsChecked
=
"{Binding SelectAll, Mode=TwoWay}"
Margin
=
"5,2,5,2"
telerik:LocalizationManager.ResourceKey
=
"GridViewFilterSelectAll"
/>
<
ListBox
x:Name
=
"PART_DistinctValuesList"
telerik:StyleManager.Theme
=
"{StaticResource Theme}"
ItemsSource
=
"{Binding DistinctValues}"
ScrollViewer.HorizontalScrollBarVisibility
=
"Auto"
SelectionMode
=
"Multiple"
MaxHeight
=
"500"
Loaded
=
"PART_DistinctValuesList_Loaded"
>
<
ListBox.ItemsPanel
>
<
ItemsPanelTemplate
>
<
VirtualizingStackPanel
/>
</
ItemsPanelTemplate
>
</
ListBox.ItemsPanel
>
<
ListBox.ItemTemplate
>
<
DataTemplate
>
<
CheckBox
IsChecked
=
"{Binding IsActive, Mode=TwoWay}"
Content
=
"{Binding ConvertedValue, Converter={StaticResource DistinctValueConverter}}"
VerticalContentAlignment
=
"Center"
Margin
=
"0,0,0,0"
/>
</
DataTemplate
>
</
ListBox.ItemTemplate
>
</
ListBox
>
</
StackPanel
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
/>
<
ColumnDefinition
/>
</
Grid.ColumnDefinitions
>
<
Button
x:Name
=
"PART_ApplyFilterButton"
Grid.Column
=
"0"
Style
=
"{StaticResource DefaultButton}"
Margin
=
"8,14,5,8"
Height
=
"22"
Visibility
=
"{TemplateBinding FilterButtonVisibility}"
telerik:LocalizationManager.ResourceKey
=
"GridViewFilter"
Loaded
=
"PART_ApplyFilterButton_Loaded"
/>
<
Button
x:Name
=
"PART_ClearFilterButton"
Grid.Column
=
"1"
Style
=
"{StaticResource DefaultButton}"
Margin
=
"5,14,8,8"
Height
=
"22"
telerik:LocalizationManager.ResourceKey
=
"GridViewClearFilter"
Loaded
=
"PART_ClearFilterButton_Loaded"
/>
</
Grid
>
</
StackPanel
>
<
telerik:RadButton
x:Name
=
"PART_FilterCloseButton"
HorizontalAlignment
=
"Right"
VerticalAlignment
=
"Top"
Margin
=
"{TemplateBinding Padding}"
Height
=
"15"
Width
=
"15"
>
<
Path
Data
=
"M4,4L5,4 5,5 4,5z M0,4L1,4 1,5 0,5z M3,3L4,3 4,4 3,4z M1,3L2,3 2,4 1,4z M2,2L3,2 3,3 2,3z M4,0L5,0 5,1 4,1 4,2 3,2 3,0.99999994 4,0.99999994z M0,0L1,0 1,0.99999994 2,0.99999994 2,2 1,2 1,1 0,1z"
Fill
=
"{StaticResource TextBrush}"
HorizontalAlignment
=
"{TemplateBinding HorizontalContentAlignment}"
Height
=
"6"
VerticalAlignment
=
"{TemplateBinding VerticalContentAlignment}"
Width
=
"6"
/>
</
telerik:RadButton
>
</
Grid
>
</
Border
>
</
Border
>
</
ControlTemplate
>
When I don't use a custom filtering control the behavior is almost the same, it will scroll all the way down in one tick on the wheel and when at the bottom of the list, the grid behind will start to scroll, even though the mouse is still over the filtering control.
I'm using the last Silverlight 4 version, is this something that is fixed later or have I done something wrong?
Regards,
HÃ¥kan