Class
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:

cs-api-definition
[TelerikToolboxCategory("Navigation")]
public class RadToolBar : ItemsControl

Inheritance: objectRadToolBar

Derived Classes: QuickAccessToolBar

Constructors

RadToolBar()

Initializes a new instance of the RadToolBar class.

Declaration

cs-api-definition
public RadToolBar()

Fields

AutoHideOverflowButtonProperty

Identifies the property.

Declaration

cs-api-definition
public static readonly DependencyProperty AutoHideOverflowButtonProperty

Field Value

DependencyProperty

BandIndexProperty

Identifies the property.

Declaration

cs-api-definition
public static readonly DependencyProperty BandIndexProperty

Field Value

DependencyProperty

BandProperty

Identifies the property.

Declaration

cs-api-definition
public static readonly DependencyProperty BandProperty

Field Value

DependencyProperty

GripVisibilityProperty

Identifies the property.

Declaration

cs-api-definition
public static readonly DependencyProperty GripVisibilityProperty

Field Value

DependencyProperty

HasOverflowItemsProperty

Identifies the property.

Declaration

cs-api-definition
public static readonly DependencyProperty HasOverflowItemsProperty

Field Value

DependencyProperty

IsOverflowOpenProperty

Identifies the property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsOverflowOpenProperty

Field Value

DependencyProperty

ItemAlignmentProperty

Registers the ItemAlignment attached property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemAlignmentProperty

Field Value

DependencyProperty

OrientationProperty

Identifies the property.

Declaration

cs-api-definition
public static readonly DependencyProperty OrientationProperty

Field Value

DependencyProperty

OverflowAreaClosedEvent

Identifies the routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent OverflowAreaClosedEvent

Field Value

RoutedEvent

OverflowAreaOpenedEvent

Identifies the routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent OverflowAreaOpenedEvent

Field Value

RoutedEvent

OverflowButtonVisibilityProperty

Identifies the property.

Declaration

cs-api-definition
public static readonly DependencyProperty OverflowButtonVisibilityProperty

Field Value

DependencyProperty

OverflowItemsProperty

DependencyProperty for the OverflowItems property.

Declaration

cs-api-definition
public static readonly DependencyProperty OverflowItemsProperty

Field Value

DependencyProperty

OverflowModeProperty

Identifies the property.

Declaration

cs-api-definition
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.

Declaration

cs-api-definition
public bool AutoHideOverflowButton { get; set; }

Property Value

bool

Band

Gets or sets a value indicating on which Tray's Band the toolbar should be positioned. This is a dependency property.

Declaration

cs-api-definition
public int Band { get; set; }

Property Value

int

BandIndex

Gets or sets a value indicating the order in a Tray's Band. This is a dependency property.

Declaration

cs-api-definition
public int BandIndex { get; set; }

Property Value

int

GripVisibility

Gets or sets the visibility of the grip visual.

Declaration

cs-api-definition
public Visibility GripVisibility { get; set; }

Property Value

Visibility

HasOverflowItems

Gets a value indicating whether the Overflow area contains items. This is a dependency property.

Declaration

cs-api-definition
public bool HasOverflowItems { get; }

Property Value

bool

IsOverflowOpen

Gets or sets a value indicating whether the Overflow area is opened or not. This is a dependency property.

Declaration

cs-api-definition
public bool IsOverflowOpen { get; set; }

Property Value

bool

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

cs-api-definition
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

cs-api-definition
public Visibility OverflowButtonVisibility { get; set; }

Property Value

Visibility

OverflowItems

Gets a collection of items that are in the overflow area.

Declaration

cs-api-definition
public IList OverflowItems { get; }

Property Value

IList

Methods

ChangeVisualState(bool)

Updates the visual state of the control.

Declaration

cs-api-definition
protected void ChangeVisualState(bool useTransitions)

Parameters

useTransitions

bool

Indicates whether transitions should be used.

GetContainerForItemOverride()

Declaration

cs-api-definition
protected override DependencyObject GetContainerForItemOverride()

Returns

DependencyObject

GetItemAlignment(DependencyObject)

Returns the value of the ItemAlignment property related to the specified object.

Declaration

cs-api-definition
public static ItemAlignment GetItemAlignment(DependencyObject obj)

Parameters

obj

DependencyObject

Returns

ItemAlignment

GetOverflowMode(DependencyObject)

Returns the value of the OverflowMode property related to the specified object.

Declaration

cs-api-definition
public static OverflowMode GetOverflowMode(DependencyObject element)

Parameters

element

DependencyObject

The item to check.

Returns

OverflowMode

MeasureOverride(Size)

Provides the behavior for the "measure" layout pass.

Declaration

cs-api-definition
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

cs-api-definition
public override void OnApplyTemplate()

OnCreateAutomationPeer()

Creates an appropriate ToolBarAutomationPeer for this control as part of the WPF/Silverlight infrastructure.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

OnInitialized(EventArgs)

Raises the event. This method is invoked whenever is set to true internally.

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

OnIsOverflowOpened(bool, bool)

Called when IsOverflowOpen property changes.

Declaration

cs-api-definition
protected virtual void OnIsOverflowOpened(bool oldValue, bool newValue)

Parameters

oldValue

bool

The old value of the property.

newValue

bool

The new value of the property.

OnItemsChanged(NotifyCollectionChangedEventArgs)

Invoked when the property changes.

Declaration

cs-api-definition
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

cs-api-definition
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

cs-api-definition
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)

Parameters

element

DependencyObject

Element used to display the specified item.

item

object

Specified item.

ResetTheme()

Resets the theme.

Declaration

cs-api-definition
public void ResetTheme()

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

cs-api-definition
public static void SetItemAlignment(DependencyObject obj, ItemAlignment value)

Parameters

obj

DependencyObject

value

ItemAlignment

SetOverflowMode(DependencyObject, OverflowMode)

Set the value of the OverflowMode property related to the specified object.

Declaration

cs-api-definition
public static void SetOverflowMode(DependencyObject element, OverflowMode mode)

Parameters

element

DependencyObject

The item to be initialized.

mode

OverflowMode

The supplied value.

Events

OverflowAreaClosed

Fired when a Overflow area is closed. This is a routed event.

Declaration

cs-api-definition
public event RoutedEventHandler OverflowAreaClosed

Event Value

RoutedEventHandler

OverflowAreaOpened

Fired when a Overflow area is opened. This is a routed event.

Declaration

cs-api-definition
public event RoutedEventHandler OverflowAreaOpened

Event Value

RoutedEventHandler