如何打印整个WPF列表框

时间:2013-01-24 18:32:50

标签: wpf vb.net printing listbox

我有一个3.5 WPF应用程序,我希望能够打印列表框的内容。我注意到,当有足够的项目需要垂直滚动条并且用户向下滚动时,它将不会打印任何上面的内容,就像它们刚刚滚动过去一样。有谁知道如何解决这个问题?

Dim pDialog As New PrintDialog
    Dim winPrint As Window = GetDowntimeWindow("PrintQueue")

    'Show the dialog to ask what printer to use
    If pDialog.ShowDialog() Then

        'Get the listbox to print
        Dim lbxLabels As ListBox = CType(winPrint.FindName("lbxLabels"), ListBox)

        pDialog.PrintVisual(lbxLabels, "Labels")

    End If

0 个答案:

没有答案