Back to Devexpress

BarSubItem.ItemLinksSourceElementGeneratesUniqueBarItem Property

wpf-devexpress-dot-xpf-dot-bars-dot-barsubitem-44ac5ada.md

latest2.5 KB
Original Source

BarSubItem.ItemLinksSourceElementGeneratesUniqueBarItem Property

Gets or sets whether each reference to a data object in an BarSubItem.ItemLinksSource for this BarSubItem should generate a unique BarItem, whether this data object was previously referenced. This is a dependency property.

Namespace : DevExpress.Xpf.Bars

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public bool ItemLinksSourceElementGeneratesUniqueBarItem { get; set; }
vb
Public Property ItemLinksSourceElementGeneratesUniqueBarItem As Boolean

Property Value

TypeDescription
Boolean

true, if each reference to a data object in an BarSubItem.ItemLinksSource for this BarSubItem should generate a unique BarItem; otherwise, false.

|

Remarks

While generating a layout via the BarSubItem.ItemLinksSource property, if you insert a reference to a single data object into multiple ItemLinksSources for different BarItemLink holders, each holder will contain a corresponding BarItemLink. However, these links will refer to a single BarItem. This default behavior prevents issues related to using two-way bindings.

However, such behavior also prevents you from defining different item templates (or styles) for the same data object. If different templates (styles) need to be defined, you can do one of the following:

  • Clone data objects;
  • Revert to the old behavior by setting the ItemLinksSourceElementGeneratesUniqueBarItem property to true for your BarSubItem.

See Also

BarSubItem Class

BarSubItem Members

DevExpress.Xpf.Bars Namespace