DXTabControl.AllowMerging Property

Gets or sets whether a tab control merges its bar items. This is a dependency property.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Xpf.Core.v20.1.dll


public bool? AllowMerging { get; set; }
Public Property AllowMerging As Boolean?

Property Value

Type Description

true, to enable merging; otherwise, false.

The default is null.


To merge a tab control's bar/ribbon items with its parent bar/ribbon, set the AllowMerging property to true.

To disable merging a tab control's bar/ribbon items, set the AllowMerging property to false.

If the AllowMerging is set to null, tab control will merge bars\ribbons that are placed within this tab control, for example bars\ribbons located in the DXTabControl.ContentHeaderTemplate or DXTabControl.ContentFooterTemplate areas and DXTabItem content will be merged. This feature is demonstrated in the example below.

Imports DevExpress.Mvvm
Imports DevExpress.Mvvm.POCO
Imports DevExpress.Mvvm.DataAnnotations
Imports System
Imports System.Linq

Namespace DXSample.ViewModel
    <POCOViewModel> _
    Public Class MainViewModel
        Protected ReadOnly Property DocumentManagerService() As IDocumentManagerService
                Return Me.GetService(Of IDocumentManagerService)()
            End Get
        End Property

        Public Sub CreateDocument()
            Dim doc As IDocument = DocumentManagerService.CreateDocument("TabView", ViewModelSource.Create(Function() New TabViewModel()))
            doc.Id = String.Format("DocId_{0}", DocumentManagerService.Documents.Count())
            doc.Title = String.Format("Item {0}", DocumentManagerService.Documents.Count())
        End Sub

        Public Sub CloseDocument()
        End Sub
    End Class
End Namespace
See Also