BarItem.CreateLink() Method
In This Article
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
public virtual BarItemLink CreateLink()
#Returns
Type | Description |
---|---|
Bar |
A Bar |
#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:
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