BinarySmartListBox
A custom ListBox class that provides a customized and enhanced items navigation experience.
public class BinarySmartListBox : ListBox
Inherits from / implements: ListBox
Remarks
The control is used like a ListBox: add items, usually BinarySmartListBoxItems, or set ItemsSource. How this control works. The template has no items presenter of its own. It shows the items in an inner list ( PART_ChildListBox ) whose items are this control's Items and whose SelectedIndex is bound two-way to this control's, inside a scroll viewer with hidden scroll bars ( PART_ChildScrollViewer ). The previous and next buttons, the arrow keys along NavigationOrientation, Home, End and the mouse wheel all move the selection one item at a time, and the selected item is then brought into view - so the list scrolls by following the selection, not by counting pixels. Keys are taken before the inner list sees them. The inner list would move its own selection on an arrow key, which is this control's through the binding, and a handler further up would then move it again: one key press, two items. The buttons follow the selection and the item count , recomputed whenever either changes; the tool tip on a disabled button says why it is disabled. Animations let go when they finish (Stop), so the animated panel goes back to sizing itself instead of keeping the size it had when the animation started.
Members at a glance
BinarySmartListBox | Initializes a new instance of the BinarySmartListBox class. |
ControlAnimationType | Gets or sets the type of the control animation. |
ItemEllipseBorderBrushHover | Gets or sets the item ellipse border brush on hover. |
ItemEllipseBorderBrushNormal | Gets or sets the item ellipse border brush normal. |
ItemEllipseBorderBrushSelected | Gets or sets the item ellipse border brush on selected. |
ItemEllipseFillHover | Gets or sets the item ellipse fill hover brush. |
ItemEllipseFillNormal | Gets or sets the item ellipse fill normal brush. |
ItemEllipseFillSelected | Gets or sets the item ellipse fill selected brush. |
ItemTitleBackground | Gets or sets the item title background brush, |
ItemTitleForeground | Gets or sets the item title foreground brush. |
NavigationButtonArrowFill | Gets or sets the navigation button arrow fill brush. |
NavigationButtonDisabledArrowFill | Gets or sets the navigation button disabled arrow fill brush. |
NavigationButtonDisabledBackground | Gets or sets the navigation button disabled background brush. |
NavigationButtonDisabledBorder | Gets or sets the navigation button disabled border brush. |
NavigationButtonDisabledBorderBrushForStrokeLayer | Gets or sets the navigation button disabled border brush for stroke layer. |
NavigationButtonDropShadowColor | Gets or sets the color of the navigation button drop shadow. |
NavigationButtonDropShadowEffect | Gets the effect the navigation buttons draw their drop shadow with. |
NavigationButtonDropShadowSoftness | Gets or sets how far the navigation button's drop shadow spreads, in device-independent pixels. |
NavigationButtonHasDropShadow | Gets or sets a value indicating whether the navigation button has drop shadow rendered. |
NavigationButtonHoverBackground | Gets or sets the navigation button hover background brush. |
NavigationButtonHoverBorder | Gets or sets the navigation button hover border brush. |
NavigationButtonHoverBorderBrushForStrokeLayer | Gets or sets the navigation button hover border brush for stroke layer. |
NavigationButtonNormalBackground | Gets or sets the navigation button normal background brush. |
NavigationButtonNormalBorder | Gets or sets the navigation button normal border brush. |
NavigationButtonNormalBorderBrushForStrokeLayer | Gets or sets the navigation button normal border brush for stroke layer. |
NavigationButtonPressedBackground | Gets or sets the navigation button pressed background brush. |
NavigationButtonPressedBorder | Gets or sets the navigation button pressed border brush. |
NavigationButtonPressedBorderBrushForStrokeLayer | Gets or sets the navigation button pressed border brush for stroke layer. |
NavigationOrientation | Gets or sets the navigation orientation. |
OnApplyTemplate | When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate. |
OnItemsChanged | Keeps the navigation buttons right as items are added and removed. |
OnPreviewKeyDown | Moves the selection with the arrow keys along the list's orientation, and to the first or last item with Home and End. |
OnPreviewMouseWheel | Moves to the next item as the mouse wheel turns towards the user, and to the previous one as it turns away. |
OnRenderSizeChanged | Called when the rendered size of the list changes, which is where the navigator recalculates how many items fit. |
OnSelectionChanged | Raises the SelectionChanged event. BinarySmartListBox overrides it so the control's own handling runs alongside the base behavior. |
ControlAnimationTypeProperty | Identifies the ControlAnimationType dependency property. |
ItemEllipseBorderBrushHoverProperty | Identifies the ItemEllipseBorderBrushHover dependency property. |
ItemEllipseBorderBrushNormalProperty | Identifies the ItemEllipseBorderBrushNormal dependency property. |
ItemEllipseBorderBrushSelectedProperty | Identifies the ItemEllipseBorderBrushSelected dependency property. |
ItemEllipseFillHoverProperty | Identifies the ItemEllipseFillHover dependency property. |
ItemEllipseFillNormalProperty | Identifies the ItemEllipseFillNormal dependency property. |
ItemEllipseFillSelectedProperty | Identifies the ItemEllipseFillSelected dependency property. |
ItemTitleBackgroundProperty | Identifies the ItemTitleBackground dependency property. |
ItemTitleForegroundProperty | Identifies the ItemTitleForeground dependency property. |
NavigationButtonArrowFillProperty | Identifies the NavigationButtonArrowFill dependency property. |
NavigationButtonDisabledArrowFillProperty | Identifies the NavigationButtonDisabledArrowFill dependency property. |
NavigationButtonDisabledBackgroundProperty | Identifies the NavigationButtonDisabledBackground dependency property. |
NavigationButtonDisabledBorderBrushForStrokeLayerProperty | Identifies the NavigationButtonDisabledBorderBrushForStrokeLayer dependency property. |
NavigationButtonDisabledBorderProperty | Identifies the NavigationButtonDisabledBorder dependency property. |
NavigationButtonDropShadowColorProperty | Identifies the NavigationButtonDropShadowColor dependency property. |
NavigationButtonDropShadowEffectProperty | Identifies the NavigationButtonDropShadowEffect dependency property. |
NavigationButtonDropShadowSoftnessProperty | Identifies the NavigationButtonDropShadowSoftness dependency property. |
NavigationButtonHasDropShadowProperty | Identifies the NavigationButtonHasDropShadow dependency property. |
NavigationButtonHoverBackgroundProperty | Identifies the NavigationButtonHoverBackground dependency property. |
NavigationButtonHoverBorderBrushForStrokeLayerProperty | Identifies the NavigationButtonHoverBorderBrushForStrokeLayer dependency property. |
NavigationButtonHoverBorderProperty | Identifies the NavigationButtonHoverBorder dependency property. |
NavigationButtonNormalBackgroundProperty | Identifies the NavigationButtonNormalBackground dependency property. |
NavigationButtonNormalBorderBrushForStrokeLayerProperty | Identifies the NavigationButtonNormalBorderBrushForStrokeLayer dependency property. |
NavigationButtonNormalBorderProperty | Identifies the NavigationButtonNormalBorder dependency property. |
NavigationButtonPressedBackgroundProperty | Identifies the NavigationButtonPressedBackground dependency property. |
NavigationButtonPressedBorderBrushForStrokeLayerProperty | Identifies the NavigationButtonPressedBorderBrushForStrokeLayer dependency property. |
NavigationButtonPressedBorderProperty | Identifies the NavigationButtonPressedBorder dependency property. |
NavigationOrientationProperty | Identifies the NavigationOrientation dependency property. |
Constructors
BinarySmartListBox
Initializes a new instance of the BinarySmartListBox class.
Properties
ControlAnimationType
Gets or sets the type of the control animation.
Value. The type of the control animation.
ItemEllipseBorderBrushHover
Gets or sets the item ellipse border brush on hover.
ItemEllipseBorderBrushNormal
Gets or sets the item ellipse border brush normal.
ItemEllipseBorderBrushSelected
Gets or sets the item ellipse border brush on selected.
ItemEllipseFillHover
Gets or sets the item ellipse fill hover brush.
ItemEllipseFillNormal
Gets or sets the item ellipse fill normal brush.
ItemEllipseFillSelected
Gets or sets the item ellipse fill selected brush.
ItemTitleBackground
Gets or sets the item title background brush,
ItemTitleForeground
Gets or sets the item title foreground brush.
Methods
OnApplyTemplate
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.
OnItemsChanged
Keeps the navigation buttons right as items are added and removed.
- e
- The change.
OnPreviewKeyDown
Moves the selection with the arrow keys along the list's orientation, and to the first or last item with Home and End.
- e
- The key.
OnPreviewMouseWheel
Moves to the next item as the mouse wheel turns towards the user, and to the previous one as it turns away.
- e
- The wheel.
OnRenderSizeChanged
Called when the rendered size of the list changes, which is where the navigator recalculates how many items fit.
- sizeInfo
- The size change.
OnSelectionChanged
Raises the SelectionChanged event. BinarySmartListBox overrides it so the control's own handling runs alongside the base behavior.
- e
- The event data.
Fields
ControlAnimationTypeProperty
Identifies the ControlAnimationType dependency property.
ItemEllipseBorderBrushHoverProperty
Identifies the ItemEllipseBorderBrushHover dependency property.
ItemEllipseBorderBrushNormalProperty
Identifies the ItemEllipseBorderBrushNormal dependency property.
ItemEllipseBorderBrushSelectedProperty
Identifies the ItemEllipseBorderBrushSelected dependency property.
ItemEllipseFillHoverProperty
Identifies the ItemEllipseFillHover dependency property.
ItemEllipseFillNormalProperty
Identifies the ItemEllipseFillNormal dependency property.
ItemEllipseFillSelectedProperty
Identifies the ItemEllipseFillSelected dependency property.
ItemTitleBackgroundProperty
Identifies the ItemTitleBackground dependency property.
ItemTitleForegroundProperty
Identifies the ItemTitleForeground dependency property.