RadToolBar
Represents a customizable toolbar control designed for navigation within an application. The RadToolBar allows the organization of tools and commands in a horizontal or vertical layout, and supports overflow management, enabling items to be dynamically displayed or hidden based on available space. This toolbar can position items into bands, control the visibility of overflow buttons, and manage item alignment. It features an integrated overflow area that opens when there are more items than can be displayed in the main area, and includes events to handle the opening and closing of this overflow area. Additionally, the RadToolBar supports theming and customization, making it adaptable to various user interface styles.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.Navigation.dll
Syntax:
[TelerikToolboxCategory("Navigation")]
public class RadToolBar : ItemsControl
Inheritance: objectRadToolBar
Derived Classes:
Constructors
Initializes a new instance of the RadToolBar class.
public RadToolBar()
Fields
AutoHideOverflowButtonProperty
DependencyProperty
Identifies the property.
public static readonly DependencyProperty AutoHideOverflowButtonProperty
BandIndexProperty
DependencyProperty
Identifies the property.
public static readonly DependencyProperty BandIndexProperty
BandProperty
DependencyProperty
Identifies the property.
public static readonly DependencyProperty BandProperty
GripVisibilityProperty
DependencyProperty
Identifies the property.
public static readonly DependencyProperty GripVisibilityProperty
HasOverflowItemsProperty
DependencyProperty
Identifies the property.
public static readonly DependencyProperty HasOverflowItemsProperty
IsOverflowOpenProperty
DependencyProperty
Identifies the property.
public static readonly DependencyProperty IsOverflowOpenProperty
ItemAlignmentProperty
DependencyProperty
Registers the ItemAlignment attached property.
public static readonly DependencyProperty ItemAlignmentProperty
OrientationProperty
DependencyProperty
Identifies the property.
public static readonly DependencyProperty OrientationProperty
OverflowAreaClosedEvent
RoutedEvent
Identifies the routed event.
public static readonly RoutedEvent OverflowAreaClosedEvent
OverflowAreaOpenedEvent
RoutedEvent
Identifies the routed event.
public static readonly RoutedEvent OverflowAreaOpenedEvent
OverflowButtonVisibilityProperty
DependencyProperty
Identifies the property.
public static readonly DependencyProperty OverflowButtonVisibilityProperty
OverflowItemsProperty
DependencyProperty
DependencyProperty for the OverflowItems property.
public static readonly DependencyProperty OverflowItemsProperty
OverflowModeProperty
DependencyProperty
Identifies the property.
public static readonly DependencyProperty OverflowModeProperty
Properties
Gets or sets a value indicating whether the OverflowButton will be automatically hidden, depending on the presence of OverflowItems.
The default value is false.
public bool AutoHideOverflowButton { get; set; }
Gets or sets a value indicating on which Tray's Band the toolbar should be positioned. This is a dependency property.
public int Band { get; set; }
Gets or sets a value indicating the order in a Tray's Band. This is a dependency property.
public int BandIndex { get; set; }
GripVisibility
Visibility
Gets or sets the visibility of the grip visual.
public Visibility GripVisibility { get; set; }
Gets a value indicating whether the Overflow area contains items. This is a dependency property.
public bool HasOverflowItems { get; }
Gets or sets a value indicating whether the Overflow area is opened or not. This is a dependency property.
public bool IsOverflowOpen { get; set; }
The default value is false.
Orientation
Orientation
Gets or sets a value indicating whether the control is vertical or horizontal. This is a dependency property.
public Orientation Orientation { get; set; }
The default value is Orientation.Horizontal.
OverflowButtonVisibility
Visibility
Gets or sets the visibility of the overflow visual.
public Visibility OverflowButtonVisibility { get; set; }
Gets a collection of items that are in the overflow area.
public IList OverflowItems { get; }
Methods
Updates the visual state of the control.
protected void ChangeVisualState(bool useTransitions)
Indicates whether transitions should be used.
GetContainerForItemOverride()
DependencyObject
protected override DependencyObject GetContainerForItemOverride()
DependencyObject
Returns the value of the ItemAlignment property related to the specified object.
public static ItemAlignment GetItemAlignment(DependencyObject obj)
Returns the value of the OverflowMode property related to the specified object.
public static OverflowMode GetOverflowMode(DependencyObject element)
The item to check.
Returns:Provides the behavior for the "measure" layout pass.
protected override Size MeasureOverride(Size availableSize)
The available size that this object can give to child objects. Infinity can be specified as a value to indicate that the object will size to whatever content is available.
Returns:Size
The size that this object determines it needs during layout.
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call .
public override void OnApplyTemplate()
OnCreateAutomationPeer()
AutomationPeer
Creates an appropriate ToolBarAutomationPeer for this control as part of the WPF/Silverlight infrastructure.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
Invoked when the property changes.
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Information about the change.
Invoked whenever the effective value of any dependency property on this System.Windows.FrameworkElement has been updated. The specific dependency property that changed is reported in the arguments parameter. Overrides System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs).
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
The event data that describes the property that changed, as well as old and new values.
Prepares the specified element to display the specified item.
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Element used to display the specified item.
itemobjectSpecified item.
Resets the theme.
public void ResetTheme()
Sets the value of the ItemAlignment property related to the specified object. Use this property to align items in the toolbar left(top) or right(bottom).
public static void SetItemAlignment(DependencyObject obj, ItemAlignment value)
Set the value of the OverflowMode property related to the specified object.
public static void SetOverflowMode(DependencyObject element, OverflowMode mode)
The item to be initialized.
modeOverflowModeThe supplied value.
Events
OverflowAreaClosed
RoutedEventHandler
Fired when a Overflow area is closed. This is a routed event.
public event RoutedEventHandler OverflowAreaClosed
OverflowAreaOpened
RoutedEventHandler
Fired when a Overflow area is opened. This is a routed event.
public event RoutedEventHandler OverflowAreaOpened