Provides page selection, optional transition animation, binding, and previous/next navigation buttons for pager-style elements.
Definition
Namespace:Telerik.WinControls.UI.Navigation
Assembly:Telerik.WinControls.UI.dll
Syntax:
public abstract class BaseNavigationElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementBaseNavigationElement...
Derived Classes:
Implements:
Inherited Members
Constructors
protected BaseNavigationElement()
Properties
Gets or sets a value indicating whether to use animation when changing its state.
public virtual bool AllowAnimation { get; set; }
Gets or sets the animation easing type.
public RadEasingType AnimationEasingType { get; set; }
Gets or sets the animation frames.
public virtual int AnimationFrames { get; set; }
Gets or sets the animation interval.
public int AnimationInterval { get; set; }
Gets whether the layout overlays the navigation buttons on the content while the buttons are not collapsed.
protected bool AreButtonsOverContent { get; }
Determines how long it takes to the navigation buttons to be hidden after the mouse leaves the control(in milliseconds). Used only when the ButtonsVisibility is VisibleOnMouseOver.
public int AutoHideButtonsDelay { get; set; }
Gets or sets the binding source.
public BindingSource BindingSource { get; set; }
The binding source.
Determines whether and how to display the navigation buttons.
public virtual ButtonsVisibility ButtonsVisibility { get; set; }
Gets the content element.
public virtual LightVisualElement ContentElement { get; protected set; }
The content element.
Gets a value indicating whether the control is currently animating.
[Browsable(false)]
public bool IsAnimating { get; }
Gets or sets a value indicating whether infinite scrolling from last to first item and vice versa is enabled.
public bool IsInfiniteScrollingEnabled { get; set; }
Gets the navigation element layout.
public NavigationElementLayout LayoutPanel { get; }
The navigation element layout.
Gets the next button.
public NavigationButtonElement NextButton { get; }
The next button.
Gets or sets the number of pages.IfBindingSource is set, this property returns theCount.
public int NumberOfPages { get; set; }
Gets or sets a value indicating how to orient the navigation buttons - horizontally or vertically.
public Orientation Orientation { get; set; }
Gets the previous button.
public NavigationButtonElement PreviousButton { get; }
The previous button.
Gets or sets the index of the selected item.
public int SelectedIndex { get; set; }
Methods
Attaches the events.
protected virtual void AttachButtonEvents()
Notifies derived elements of a bound-list change and recalculates navigation visibility. Derived elements can refresh their own visuals in the notification hook.
protected virtual void BindingSource_ListChanged(object sender, ListChangedEventArgs e)
The binding source that raised the change.
eListChangedEventArgsDetails about the list change.
Determines whether moving to next item is possible.
Determines whether moving to previous item is possible.
For a positive page count, maps negative indices to zero and indices at or above the count to the last page. With a zero or negative page count, the upper-bound result is also negative.
Creates the navigation layout, previous and next buttons, and content element, then wires the button click handlers.
protected override void CreateChildElements()
Overrides:
Creates the visual element that displays the currently selected page or item.
protected abstract LightVisualElement CreateContentElement()
The content element managed by this navigation element.
Creates the layout that positions this element's content and navigation buttons.
protected virtual NavigationElementLayout CreateLayoutPanel()
A layout panel owned by this navigation element.
Creates the button used to navigate to the next page or item.
protected virtual NavigationButtonElement CreateNextPageButton()
The next-navigation button.
Creates the button used to navigate to the previous page or item.
protected virtual NavigationButtonElement CreatePreviousPageButton()
The previous-navigation button.
Unwires the buttons and text box events.
protected virtual void DetachButtonEvents()
Detaches button handlers, stops and releases animation state, and disposes the optional auto-hide timer.
protected override void DisposeManagedResources()
Overrides:
Returns the next index taking into account whether infinite looping is enabled.
Returns the previous index taking into account whether infinite looping is enabled.
Initializes default animation, scrolling, page-count, and selection state before the child elements are created.
protected override void InitializeFields()
Overrides:
Handles the Click event of the NextButton.
Raises AnimationFinished when a content transition completes.
protected virtual void OnAnimationFinished(AnimationStatusEventArgs e)
The animation status data.
Raises AnimationStarted when a content transition begins.
protected virtual void OnAnimationStarted(AnimationStatusEventArgs e)
The animation status data.
Notifies observers of a binding-source change and refreshes visuals when the owning control is initialized.
protected virtual void OnBindingSourceChanged()
Provides a hook for derived elements to react to changes in the bound list.
protected virtual void OnBindingSourceListChanged()
Navigates to the adjacent page with arrow keys that match the current orientation when the key is unhandled.
protected override void OnKeyDown(KeyEventArgs e)
The key event data, whose handled state is updated when navigation occurs.
Overrides:
Called when the element has been successfully loaded. That includes loading of all its children as well.
protected override void OnLoaded()
Overrides:
Stops a pending button hide timer and refreshes navigation-button visibility when the pointer enters.
protected virtual void OnMouseEnter()
Starts the configured hide timer on pointer exit, or immediately refreshes button visibility when no delay is set.
protected virtual void OnMouseLeave()
Moves to the next page for a positive wheel delta and to the previous page otherwise.
protected override void OnMouseWheel(MouseEventArgs e)
The mouse-wheel event data.
Overrides:
Notifies observers of a page-count change and refreshes the navigation buttons' enabled states.
protected virtual void OnNumberOfPagesChanged()
Routes changes to the mouse-over state through the corresponding enter or leave behavior.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The changed property and its old and new values.
Overrides:
Handles the Click event of the PreviousButton.
Handles bubbled item key events through this element's navigation logic and cancels their further routing.
public override void RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
The child element that raised the event.
argsRoutedEventArgsThe routed event data.
Overrides:
Selects the specified index.
Updates the derived element's content when selection changes, optionally animating the transition.
Moves the selected item to the next one.
public void SelectNext()
Moves the selected item to the previous one.
public void SelectPrevious()
Animates the specified property on the content element using this element's animation settings.
protected virtual void StartAnimation(RadProperty animationProperty, object startValue, object endValue)
The property to animate.
startValueobjectThe property's starting value.
endValueobjectThe property's target value.
Stops the currently running animation.
public virtual void StopAnimation()
Updates button enabled states from the available navigation range and applies the configured visibility mode.
protected virtual void UpdateNavigationButtons()
Updates the text box.
protected virtual void UpdateSelectedIndex()
Updates the visibility.
public virtual void UpdateVisibility()
Refreshes the derived element's page or item visuals after its source or selection changes.
protected abstract void UpdateVisualItems()
Events
Occurs when the animation is finished.
public event AnimationFinishedEventHandler AnimationFinished
Occurs when the animation is started.
public event AnimationStartedEventHandler AnimationStarted