Skip to main content

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.v24.2.dll

NuGet Package: DevExpress.Wpf.Core

Declaration

public bool? AllowMerging { get; set; }

Property Value

Type Description
Nullable<Boolean>

true, to enable merging; otherwise, false.

The default is null.

Remarks

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
            Get
                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())
            doc.Show()
        End Sub

        Public Sub CloseDocument()
            DocumentManagerService.ActiveDocument.Close()
        End Sub
    End Class
End Namespace
See Also