Skip to main content
Bar

BarItem.CreateLink() Method

Creates a link that refers to the current item.

Namespace: DevExpress.Xpf.Bars

Assembly: DevExpress.Xpf.Core.v24.2.dll

NuGet Package: DevExpress.Wpf.Core

Declaration

Returns

Type Description
BarItemLink

A BarItemLink object that represents a link to the current item.

Remarks

To add a bar item to a bar, first a link object must be created. Use the CreateLink method to create a link to the current bar item.

Once a link has been created, it can be added to a bar via the bar’s inherited BarItemLinkHolderBase.ItemLinks collection.

To learn more, see Items and Links.

Example

This example shows how to create bar items and associate them with a custom Format category.

The following image shows the result:

E1543

Imports System
Imports System.Collections.Generic
Imports System.Configuration
Imports System.Data
Imports System.Linq
Imports System.Windows

Namespace WpfApplication3
    ''' <summary>
    ''' Interaction logic for App.xaml
    ''' </summary>
    Partial Public Class App
        Inherits Application

        Private Sub OnAppStartup_UpdateThemeName(ByVal sender As Object, ByVal e As StartupEventArgs)

            DevExpress.Xpf.Core.ApplicationThemeHelper.UpdateApplicationThemeName()
        End Sub
    End Class
End Namespace
See Also