Represents the core element implementation of a binding navigator control that provides data navigation functionality through a command bar interface. This element manages the creation and behavior of navigation buttons, position display, and data binding operations for traversing and manipulating data source records.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadBindingNavigatorElement : RadCommandBarElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadCommandBarVisualElementRadCommandBarElementRadBindingNavigatorElement...
Implements:
Inherited Members
Constructors
public RadBindingNavigatorElement()
Fields
Identifies the AddNewButtonImage dependency property used for storing the image displayed on the add new item button.
public static RadProperty AddNewButtonImageProperty
Identifies the AddNewButtonSvgImage dependency property used for storing the SVG image displayed on the add new item button.
public static RadProperty AddNewButtonSvgImageProperty
Identifies the ButtonDisplayStyle dependency property used for controlling how navigation buttons display their content.
public static RadProperty ButtonDisplayStyleProperty
Identifies the ButtonGlyphSize dependency property used for controlling the size of button glyphs and icons.
public static RadProperty ButtonGlyphSizeProperty
Identifies the DeleteButtonImage dependency property used for storing the image displayed on the delete item button.
public static RadProperty DeleteButtonImageProperty
Identifies the DeleteButtonSvgImage dependency property used for storing the SVG image displayed on the delete item button.
public static RadProperty DeleteButtonSvgImageProperty
Identifies the MoveFirstItemButtonImage dependency property used for storing the image displayed on the move first item button.
public static RadProperty MoveFirstItemButtonImageProperty
Identifies the MoveFirstItemButtonSvgImage dependency property used for storing the SVG image displayed on the move first item button.
public static RadProperty MoveFirstItemButtonSvgImageProperty
Identifies the MoveLastItemButtonImage dependency property used for storing the image displayed on the move last item button.
public static RadProperty MoveLastItemButtonImageProperty
Identifies the MoveLastItemButtonSvgImage dependency property used for storing the SVG image displayed on the move last item button.
public static RadProperty MoveLastItemButtonSvgImageProperty
Identifies the MoveNextItemButtonImage dependency property used for storing the image displayed on the move next item button.
public static RadProperty MoveNextItemButtonImageProperty
Identifies the MoveNextItemButtonSvgImage dependency property used for storing the SVG image displayed on the move next item button.
public static RadProperty MoveNextItemButtonSvgImageProperty
Identifies the MovePreviousItemButtonImage dependency property used for storing the image displayed on the move previous item button.
public static RadProperty MovePreviousItemButtonImageProperty
Identifies the MovePreviousItemButtonSvgImage dependency property used for storing the SVG image displayed on the move previous item button.
public static RadProperty MovePreviousItemButtonSvgImageProperty
Properties
Gets or sets the command bar button that creates a new record in the data source when clicked, typically displaying an "add" or "plus" icon or glyph.
public CommandBarButton AddNewButton { get; set; }
Gets or sets the image displayed on the button that adds a new item to the data source, providing visual indication of the add new record function.
[TypeConverter(typeof(ImageTypeConverter))]
public Image AddNewButtonImage { get; set; }
Gets or sets the vector SVG image displayed on the button that adds a new item to the data source, providing scalable visual indication of the add new record function.
public RadSvgImage AddNewButtonSvgImage { get; set; }
Gets or sets a value indicating whether the control automatically handles the creation of new items when the add new button is clicked, managing the add new operation internally when enabled.
public bool AutoHandleAddNew { get; set; }
Gets or sets the BindingSource that provides the data for navigation operations. When set, this property establishes data binding connections and manages list change and position change event subscriptions for automatic UI updates.
public BindingSource BindingSource { get; set; }
Gets or sets a value indicating whether the navigation buttons display images, SVG images, or glyph characters, controlling the visual style of all navigation and action buttons.
public BindingNavigatorButtonDisplayStyle ButtonDisplayStyle { get; set; }
Gets or sets the font size of button glyphs when the ButtonDisplayStyle property is set to Glyph, allowing customization of glyph visual size.
public float ButtonGlyphSize { get; set; }
Gets or sets the main command bar row element that serves as the container for all navigation strips and provides the structural foundation for the binding navigator layout.
public CommandBarRowElement CommandBarRowElement { get; set; }
Gets or sets the format string used for displaying the total count of items in the data source, where placeholders like "{0}" are replaced with the actual count value.
public string CountItemFormat { get; set; }
Gets or sets the command bar textbox that displays the current record position and allows direct navigation to a specific record number when a value is entered and confirmed.
public CommandBarTextBox CurrentNumberTextBox { get; set; }
Gets or sets the command bar button that deletes the current record from the data source when clicked, typically displaying a "delete" or "trash" icon or glyph.
public CommandBarButton DeleteButton { get; set; }
Gets or sets the image displayed on the button that deletes the current item from the data source, providing visual indication of the delete record function.
[TypeConverter(typeof(ImageTypeConverter))]
public Image DeleteButtonImage { get; set; }
Gets or sets the vector SVG image displayed on the button that deletes the current item from the data source, providing scalable visual indication of the delete record function.
public RadSvgImage DeleteButtonSvgImage { get; set; }
Gets or sets the command bar button that navigates to the first record in the data source when clicked, typically displaying a "move to first" icon or glyph.
public CommandBarButton FirstButton { get; set; }
Gets or sets the primary command bar strip element that contains the main navigation controls including first, previous, next, last buttons and position display elements.
public CommandBarStripElement FirstTopStripElement { get; set; }
Gets or sets the command bar button that navigates to the last record in the data source when clicked, typically displaying a "move to last" icon or glyph.
public CommandBarButton LastButton { get; set; }
Gets or sets the image displayed on the button that navigates to the first item in the data source, providing visual indication of the first record navigation function.
[TypeConverter(typeof(ImageTypeConverter))]
public Image MoveFirstItemButtonImage { get; set; }
Gets or sets the vector SVG image displayed on the button that navigates to the first item in the data source, providing scalable visual indication of the first record navigation function.
public RadSvgImage MoveFirstItemButtonSvgImage { get; set; }
Gets or sets the image displayed on the button that navigates to the last item in the data source, providing visual indication of the last record navigation function.
[TypeConverter(typeof(ImageTypeConverter))]
public Image MoveLastItemButtonImage { get; set; }
Gets or sets the vector SVG image displayed on the button that navigates to the last item in the data source, providing scalable visual indication of the last record navigation function.
public RadSvgImage MoveLastItemButtonSvgImage { get; set; }
Gets or sets the image displayed on the button that navigates to the next item in the data source, providing visual indication of the next record navigation function.
[TypeConverter(typeof(ImageTypeConverter))]
public Image MoveNextItemButtonImage { get; set; }
Gets or sets the vector SVG image displayed on the button that navigates to the next item in the data source, providing scalable visual indication of the next record navigation function.
public RadSvgImage MoveNextItemButtonSvgImage { get; set; }
Gets or sets the image displayed on the button that navigates to the previous item in the data source, providing visual indication of the previous record navigation function.
[TypeConverter(typeof(ImageTypeConverter))]
public Image MovePreviousItemButtonImage { get; set; }
Gets or sets the vector SVG image displayed on the button that navigates to the previous item in the data source, providing scalable visual indication of the previous record navigation function.
public RadSvgImage MovePreviousItemButtonSvgImage { get; set; }
Gets the parent RadBindingNavigator control that contains this element, providing access to the host control for configuration and event handling.
public RadBindingNavigator Navigator { get; }
Gets or sets the command bar button that navigates to the next record in the data source when clicked, typically displaying a "move to next" icon or glyph.
public CommandBarButton NextButton { get; set; }
Gets or sets the command bar label that displays the total count of records in the data source using the format specified by the CountItemFormat property.
public CommandBarLabel PageLabel { get; set; }
Gets or sets the command bar button that navigates to the previous record in the data source when clicked, typically displaying a "move to previous" icon or glyph.
public CommandBarButton PreviousButton { get; set; }
Gets or sets the secondary command bar strip element that contains data manipulation controls including add new and delete buttons for record management operations.
public CommandBarStripElement SecondBottomStripElement { get; set; }
Gets the effective theme type for this element, which returns RadCommandBarElement to ensure consistent theming with command bar controls.
protected override Type ThemeEffectiveType { get; }
Overrides:
Methods
Handles the click event of the add new button, creating a new record in the BindingSource when auto-handling is enabled and addition is allowed, then updating the navigation state.
Creates and configures the standard navigation items including first, previous, next, last buttons, position textbox, and count label, setting up the primary navigation strip with proper design-time or runtime component creation.
public virtual void AddStandardItems()
Attaches click event handlers to all navigation and action buttons, and key event handlers to the position textbox for user interaction processing.
protected virtual void AttachEvents()
Handles list change events from the BindingSource, updating the navigation state and button visibility when the data collection is modified.
protected virtual void bindingSource_ListChanged(object sender, ListChangedEventArgs e)
The BindingSource that raised the list changed event.
eListChangedEventArgsEvent arguments containing information about the list change operation.
Handles position change events from the BindingSource, updating the navigation state and current position display when the active record changes.
protected virtual void bindingSource_PositionChanged(object sender, EventArgs e)
The BindingSource that raised the position changed event.
eEventArgsEvent arguments for the position change notification.
Creates and configures the primary navigation strip containing first, previous, next, and last buttons along with the current position textbox and count label, handling both design-time and runtime component creation scenarios.
protected virtual void CreateFirstTopStripElementChildElements()
Creates and configures the secondary strip containing add new and delete buttons for data manipulation operations, handling both design-time and runtime component creation scenarios.
protected virtual void CreateSecondBottomStripElementChildElements()
Handles the key down event of the current number textbox, processing Enter key presses to navigate to a specific record position when a valid number is entered.
protected virtual void currentNumberTextBox_KeyDown(object sender, KeyEventArgs e)
The current number textbox where the key was pressed.
eKeyEventArgsEvent arguments containing information about the key that was pressed.
Handles the click event of the delete button, removing the current record from the BindingSource when deletion is allowed and updating the navigation state.
Detaches all event handlers from navigation buttons and textbox controls to prevent memory leaks and ensure proper cleanup during disposal.
protected virtual void DetachEvents()
Releases managed resources including event handler detachment when the binding navigator element is being disposed.
protected override void DisposeManagedResources()
Overrides:
Handles the click event of the first button, navigating to the first record in the BindingSource and updating the navigation state.
Initializes the default field values for the binding navigator element, setting up default glyph characters for navigation and action buttons.
protected override void InitializeFields()
Overrides:
Handles the click event of the last button, navigating to the last record in the BindingSource and updating the navigation state.
Performs the core loading logic for the binding navigator element, mapping existing controls and attaching event handlers for navigation functionality.
protected override void LoadCore()
Overrides:
Maps and identifies the various navigation control elements within the command bar structure based on their names or command roles, establishing references for programmatic access.
protected virtual void MapControls()
Handles the click event of the next button, navigating to the next record in the BindingSource and updating the navigation state.
Called when the element and all its children have been successfully loaded, triggering an initial update of the navigation state and button visibility.
protected override void OnLoaded()
Overrides:
Handles property change notifications and updates the visual appearance of navigation buttons based on image, SVG, or display style property changes, ensuring the UI reflects current property values.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Event arguments containing information about the changed property and its values.
Overrides:
Handles the click event of the previous button, navigating to the previous record in the BindingSource and updating the navigation state.
Updates the enabled state of the add new button based on whether the data source allows new item creation and whether the data type has a parameterless constructor.
protected virtual void UpdateAddNewButtonVisibility()
Updates the specified button's visual appearance based on the current ButtonDisplayStyle setting, configuring the button to display either images or glyph characters with appropriate styling.
protected virtual void UpdateButton(CommandBarButton button, string glyph)
The CommandBarButton to update with the specified glyph or image display.
glyphstringThe glyph character to display when ButtonDisplayStyle is set to Glyph mode.
Updates the enabled state of the delete button based on whether there are records in the data source that can be deleted.
protected virtual void UpdateDeleteButtonVisibility()
Updates the count label text using the CountItemFormat to display the total number of records in the data source.
protected virtual void UpdateLabelText()
Updates the enabled state of the first, previous, next, and last navigation buttons based on the current position within the data source to prevent invalid navigation operations.
protected virtual void UpdateNavigationButtons()
Updates the current position textbox to display the current record number, showing the 1-based position of the active record in the data source.
protected virtual void UpdateTextBox()
Updates the visibility and enabled state of all navigation controls based on the current data source state, ensuring the UI accurately reflects the available navigation operations.
public virtual void UpdateVisibility()