Skip to main content
A newer version of this page is available. .
Bar

BarItem.CreateLink() Method

Creates a link that refers to the current item.

Namespace: DevExpress.Xpf.Bars

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

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

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CreateLink() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also