PopupMenuInfo.ItemLinksSourceElementGeneratesUniqueBarItem Property
Gets or sets whether each reference to a data object in an PopupMenuInfo.ItemLinksSource for this PopupMenuInfo 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.v24.1.dll
NuGet Package: DevExpress.Wpf.Core
Declaration
Property Value
Type | Description |
---|---|
Boolean | true, if each reference to a data object in an PopupMenuInfo.ItemLinksSource for this PopupMenuInfo should generate a unique BarItem; otherwise, false. |
Remarks
Instead of populating a popup menu manually, you can use the PopupMenuInfo.ItemLinksSource property to retrieve items from a given source. The same item link source can also be used by other link containers. In this case, each container will receive a corresponding BarItemLink. However, all these links will refer to a single BarItem. This default behavior prevents possible two-way bindings issues.
Conversely, such behavior also prevents you from defining different item templates (or styles) for the same data object. If you need different templates (styles), do one of the following:
- clone required data objects;
- set the ItemLinksSourceElementGeneratesUniqueBarItem property to true to generate a unique bar item for this specific menu.