RadBindingNavigator
Represents a navigation control that provides a standardized interface for browsing and manipulating data through a BindingSource. This control includes built-in buttons for moving through records, adding new records, deleting records, and saving changes with support for both horizontal and vertical orientations.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[TelerikToolboxCategory("Data Controls")]
public class RadBindingNavigator : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadBindingNavigator...
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadBindingNavigator class with auto-sizing enabled by default to accommodate the navigation controls.
public RadBindingNavigator()
Fields
The event key used to identify and manage the OrientationChanged event in the control's event collection.
public static readonly object OrientationChangedEventKey
The event key used to identify and manage the OrientationChanging event in the control's event collection.
public static readonly object OrientationChangingEventKey
Properties
Gets or sets a value indicating whether the control automatically handles the creation of new items when the add new button is clicked. When set to true, the control manages the add new operation internally.
public bool AutoHandleAddNew { get; set; }
Gets or sets a value indicating whether the control automatically resizes to fit its contents, ensuring optimal space usage for the navigation elements.
public override bool AutoSize { get; set; }
Overrides:
Gets the main binding navigator element that contains all the navigation controls and data binding functionality. This element is not accessible through the designer and provides programmatic access to the core navigation features.
[Browsable(false)]
public RadBindingNavigatorElement BindingNavigatorElement { get; }
Gets or sets the BindingSource that provides the data source for navigation operations. This binding source determines which data collection the navigator controls and enables data manipulation features.
[Browsable(true)]
public BindingSource BindingSource { get; set; }
Gets or sets the format string used to display the total count of items in the data source. The format string should contain a placeholder like "{0}" which will be replaced with the actual count value.
[Browsable(true)]
public string CountItemFormat { get; set; }
Gets the RadDropDownMenu that appears when right-clicking on the control, providing customization options for strip visibility and layout configuration.
public RadDropDownMenu CustomizeContextMenu { get; }
Gets the default size of the control when no explicit size is specified, providing a minimum usable dimension for the navigation interface.
protected override Size DefaultSize { get; }
Overrides:
Gets or sets which edges of the RadBindingNavigator are docked to its parent control and determines how the control is resized with its parent. Setting this property automatically adjusts the Orientation based on the dock position.
public override DockStyle Dock { get; set; }
The value assigned is not one of the DockStyle values.
Overrides:
Gets or sets the size of the rectangle centered on the initial mouse click point within which a drag operation will not begin, providing a tolerance area for click operations versus drag initiation.
public Size DragSize { get; set; }
Gets or sets the orientation of the RadBindingNavigator which can be horizontal or vertical. This property is automatically controlled by the Dock property to ensure proper layout based on docking position.
[Browsable(false)]
public Orientation Orientation { get; set; }
Gets the collection of command bar rows that contain the navigation buttons and controls. This collection allows customization of the navigator layout and addition of custom command elements.
[RadNewItem("", false, true, true)]
[RadEditItemsAction]
[Browsable(true)]
public RadCommandBarLinesElementCollection Rows { get; }
Methods
Determines whether this control defines the theme for the specified element, returning true for specific element types that require themed appearance consistent with the binding navigator.
public override bool ControlDefinesThemeForElement(RadElement element)
The RadElement to check for theme definition responsibility.
Returns:True if this control defines the theme for the specified element; otherwise, false.
Overrides:
Creates the child items for the navigator control, including the main navigator element and context menu infrastructure for customization options.
protected override void CreateChildItems(RadElement parent)
The parent element that will contain the created child items.
Overrides:
Creates the RadBindingNavigatorElement element.
protected virtual RadBindingNavigatorElement CreateNavigatorElement()
An instance of RadBindingNavigatorElement.
Creates the root element for the RadBindingNavigator control, providing the foundational container for all child elements.
protected override RootRadElement CreateRootElement()
A new instance of RadBindingNavigator.RadBindingNavigatorRootElement that serves as the root container.
Overrides:
Raises the ContextMenuOpening event, allowing derived classes to perform custom processing when the context menu is about to be displayed.
protected virtual void OnContextMenuOpening(CancelEventArgs e)
A CancelEventArgs that contains the event data and allows cancellation of the menu display.
Called when the control is loaded with the specified desired size, enabling gesture support for pan operations on the navigation interface.
protected override void OnLoad(Size desiredSize)
The desired size for the control during the load operation.
Overrides:
Handles mouse down events, specifically processing right-click operations to display the context menu for strip customization when clicking on appropriate areas of the control.
protected override void OnMouseDown(MouseEventArgs e)
Mouse event arguments containing button information and click location.
Overrides:
Raises the OrientationChanged event to notify subscribers that the orientation change has been completed successfully.
Raises the OrientationChanging event and determines whether the orientation change should be cancelled based on subscriber responses.
protected virtual bool OnOrientationChanging(CancelEventArgs args)
A CancelEventArgs that contains the event data and cancellation flag.
Returns:True if the orientation change should be cancelled; otherwise, false.
Called when the parent of the control changes, managing the attachment and detachment of event handlers for the parent form's size changes to handle floating strip visibility properly.
protected override void OnParentChanged(EventArgs e)
Event arguments containing information about the parent change.
Overrides:
Called when the theme of the control changes, ensuring that theme settings are properly propagated to all child elements and context menu components.
protected override void OnThemeChanged()
Overrides:
Overrides the auto-size change processing to prevent default behavior, allowing the control to manage its own sizing logic for the navigation interface.
protected override void ProcessAutoSizeChanged(bool value)
The new auto-size value being applied.
Overrides:
Processes CodedUI automation messages, handling specific property requests such as "Lines" count for automated testing scenarios and delegating other requests to the base implementation.
protected override void ProcessCodedUIMessage(ref IPCMessage request)
The CodedUI message containing the automation request details and response data.
Overrides:
Resets the background color theme overrides to their default values, removing custom background color settings and reapplying the default theme to the element tree.
protected override void ResetBackColorThemeOverrides()
Overrides:
Resets the foreground color theme overrides to their default values, removing custom foreground color settings from the binding navigator element.
protected override void ResetForeColorThemeOverrides()
Overrides:
Sets theme overrides for the background color properties, applying the control's background color and solid gradient style to the binding navigator element and command bar rows.
protected override void SetBackColorThemeOverrides()
Overrides:
Sets theme overrides for the foreground color property, applying the control's foreground color to the binding navigator element for consistent text appearance.
protected override void SetForeColorThemeOverrides()
Overrides:
Applies the specified orientation to the control and its child elements, managing the layout transition and event firing based on the parameters provided.
protected virtual void SetOrientationCore(Orientation value, bool fireEvents)
The Orientation value to apply to the control layout.
fireEventsboolTrue to fire the OrientationChanging and OrientationChanged events; otherwise, false.
Propagates the current theme name to child command bar elements and their overflow buttons, ensuring consistent visual appearance across all navigation components.
protected virtual void SetThemeCore()
Events
Occurs when the context menu is about to be opened, allowing the menu display to be cancelled or customized through the event arguments.
public event CancelEventHandler ContextMenuOpening
Occurs after a floating toolbar strip has been successfully created, providing notification that the floating form is now available for user interaction.
public event EventHandler FloatingStripCreated
Occurs before a floating toolbar strip is created, allowing the operation to be cancelled. This event provides control over the floating strip creation process.
public event CancelEventHandler FloatingStripCreating
Occurs after a floating toolbar strip has been successfully docked back to the main control, confirming that the docking operation has been completed.
public event EventHandler FloatingStripDocked
Occurs before a floating toolbar strip is docked back to the main control, allowing the docking operation to be cancelled through the event arguments.
public event CancelEventHandler FloatingStripDocking
Occurs after the Orientation property has been changed, notifying subscribers that the layout orientation transition has been completed.
public event EventHandler OrientationChanged
Occurs before the Orientation property changes, allowing the change to be cancelled through the event arguments. This event provides an opportunity to validate or prevent orientation changes.
public event CancelEventHandler OrientationChanging