Skip to main content

CompositeLink Class

A composite link that can be used to combine several Printing Links together into a composite document.

Namespace: DevExpress.Xpf.Printing

Assembly: DevExpress.Xpf.Printing.v24.1.dll

NuGet Package: DevExpress.Wpf.Printing

Declaration

Remarks

This code example demonstrates how to use the CompositeLink class to combine contents of several printing links in a single document.

View Example

Imports System.Collections.Generic
Imports System.Windows
Imports System.Windows.Documents
Imports DevExpress.Xpf.Grid
Imports DevExpress.Xpf.Printing
' ...

Namespace CompositeLinkExample
    ''' <summary>
    ''' Interaction logic for MainWindow.xaml
    ''' </summary>
    Partial Public Class MainWindow
        Inherits Window

        Public Sub New()
            InitializeComponent()
        End Sub

        Private Sub printButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
            Dim links As New List(Of TemplatedLink)()
            links.Add(New PrintableControlLink(CType(categoriesGrid.View, TableView)))
            links.Add(New PrintableControlLink(CType(productsGrid.View, TableView)))

            Dim compositeLink As New CompositeLink(links)
            PrintHelper.ShowRibbonPrintPreview(Me, compositeLink)
        End Sub
    End Class
End Namespace

The image below demonstrates the result.

wpf-composite-link-preview

See Also