ClassRadToolBar
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
RadToolBar()
Initializes a new instance of the RadToolBar class.
Declaration
public RadToolBar()
Fields
AutoHideOverflowButtonProperty
Identifies the property.
Declaration
public static readonly DependencyProperty AutoHideOverflowButtonProperty
Field Value
DependencyProperty
BandIndexProperty
Identifies the property.
Declaration
public static readonly DependencyProperty BandIndexProperty
Field Value
DependencyProperty
BandProperty
Identifies the property.
Declaration
public static readonly DependencyProperty BandProperty
Field Value
DependencyProperty
GripVisibilityProperty
Identifies the property.
Declaration
public static readonly DependencyProperty GripVisibilityProperty
Field Value
DependencyProperty
HasOverflowItemsProperty
Identifies the property.
Declaration
public static readonly DependencyProperty HasOverflowItemsProperty
Field Value
DependencyProperty
IsOverflowOpenProperty
Identifies the property.
Declaration
public static readonly DependencyProperty IsOverflowOpenProperty
Field Value
DependencyProperty
ItemAlignmentProperty
Registers the ItemAlignment attached property.
Declaration
public static readonly DependencyProperty ItemAlignmentProperty
Field Value
DependencyProperty
OrientationProperty
Identifies the property.
Declaration
public static readonly DependencyProperty OrientationProperty
Field Value
DependencyProperty
OverflowAreaClosedEvent
Identifies the routed event.
Declaration
public static readonly RoutedEvent OverflowAreaClosedEvent
Field Value
RoutedEvent
OverflowAreaOpenedEvent
Identifies the routed event.
Declaration
public static readonly RoutedEvent OverflowAreaOpenedEvent
Field Value
RoutedEvent
OverflowButtonVisibilityProperty
Identifies the property.
Declaration
public static readonly DependencyProperty OverflowButtonVisibilityProperty
Field Value
DependencyProperty
OverflowItemsProperty
DependencyProperty for the OverflowItems property.
Declaration
public static readonly DependencyProperty OverflowItemsProperty
Field Value
DependencyProperty
OverflowModeProperty
Identifies the property.
Declaration
public static readonly DependencyProperty OverflowModeProperty
Field Value
DependencyProperty
Properties
AutoHideOverflowButton
Gets or sets a value indicating whether the OverflowButton will be automatically hidden, depending on the presence of OverflowItems.
The default value is false.
Band
Gets or sets a value indicating on which Tray's Band the toolbar should be positioned. This is a dependency property.
BandIndex
Gets or sets a value indicating the order in a Tray's Band. This is a dependency property.
GripVisibility
Gets or sets the visibility of the grip visual.
Declaration
public Visibility GripVisibility { get; set; }
Property Value
Visibility
HasOverflowItems
Gets a value indicating whether the Overflow area contains items. This is a dependency property.
IsOverflowOpen
Gets or sets a value indicating whether the Overflow area is opened or not. This is a dependency property.
Declaration
public bool IsOverflowOpen { get; set; }
Property Value
Remarks
The default value is false.
Orientation
Gets or sets a value indicating whether the control is vertical or horizontal. This is a dependency property.
Declaration
public Orientation Orientation { get; set; }
Property Value
Orientation
Remarks
The default value is Orientation.Horizontal.
OverflowButtonVisibility
Gets or sets the visibility of the overflow visual.
Declaration
public Visibility OverflowButtonVisibility { get; set; }
Property Value
Visibility
OverflowItems
Gets a collection of items that are in the overflow area.
Methods
ChangeVisualState(bool)
Updates the visual state of the control.
Declaration
protected void ChangeVisualState(bool useTransitions)
Parameters
useTransitions
Indicates whether transitions should be used.
GetContainerForItemOverride()
Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
DependencyObject
GetItemAlignment(DependencyObject)
Returns the value of the ItemAlignment property related to the specified object.
Declaration
public static ItemAlignment GetItemAlignment(DependencyObject obj)
Parameters
obj
DependencyObject
Returns
GetOverflowMode(DependencyObject)
Returns the value of the OverflowMode property related to the specified object.
Declaration
public static OverflowMode GetOverflowMode(DependencyObject element)
Parameters
element
DependencyObject
The item to check.
Returns
MeasureOverride(Size)
Provides the behavior for the "measure" layout pass.
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
availableSize
Size
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.
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call .
Declaration
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Creates an appropriate ToolBarAutomationPeer for this control as part of the WPF/Silverlight infrastructure.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
OnInitialized(EventArgs)
Raises the event. This method is invoked whenever is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
e
The RoutedEventArgs that contains the event data.
OnIsOverflowOpened(bool, bool)
Called when IsOverflowOpen property changes.
OnItemsChanged(NotifyCollectionChangedEventArgs)
Invoked when the property changes.
Declaration
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters
e
NotifyCollectionChangedEventArgs
Information about the change.
OnPropertyChanged(DependencyPropertyChangedEventArgs)
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).
Declaration
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
Parameters
e
DependencyPropertyChangedEventArgs
The event data that describes the property that changed, as well as old and new values.
PrepareContainerForItemOverride(DependencyObject, object)
Prepares the specified element to display the specified item.
Declaration
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
element
DependencyObject
Element used to display the specified item.
item
Specified item.
SetItemAlignment(DependencyObject, ItemAlignment)
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).
Declaration
public static void SetItemAlignment(DependencyObject obj, ItemAlignment value)
Parameters
obj
DependencyObject
value
SetOverflowMode(DependencyObject, OverflowMode)
Set the value of the OverflowMode property related to the specified object.
Declaration
public static void SetOverflowMode(DependencyObject element, OverflowMode mode)
Parameters
element
DependencyObject
The item to be initialized.
mode
The supplied value.
Events
OverflowAreaClosed
Fired when a Overflow area is closed. This is a routed event.
Declaration
public event RoutedEventHandler OverflowAreaClosed
Event Value
RoutedEventHandler
OverflowAreaOpened
Fired when a Overflow area is opened. This is a routed event.
Declaration
public event RoutedEventHandler OverflowAreaOpened
Event Value
RoutedEventHandler