PageRangeSelection 열거형

정의

인쇄 등의 작업에서 모든 페이지를 처리하는지 제한된 범위만 처리하는지를 지정합니다.

public enum class PageRangeSelection
public enum PageRangeSelection
type PageRangeSelection = 
Public Enum PageRangeSelection
상속
PageRangeSelection

필드

AllPages 0

모든 페이지

CurrentPage 2

현재 페이지입니다.

SelectedPages 3

선택한 페이지입니다.

UserPages 1

사용자가 지정한 페이지 범위

예제

다음 예제에서는 열거형을 사용하여 XAML(Extensible Application Markup Language) 및 코드를 사용하여 속성을 설정하는 PageRangeSelection 방법을 보여 줍니다.

<Button Width="200" Click="InvokePrint">Invoke PrintDialog</Button>

...

private void InvokePrint(object sender, RoutedEventArgs e)
    {
        // Create the print dialog object and set options
        PrintDialog pDialog = new PrintDialog();
        pDialog.PageRangeSelection = PageRangeSelection.AllPages;
        pDialog.UserPageRangeEnabled = true;

        // Display the dialog. This returns true if the user presses the Print button.
        Nullable<Boolean> print = pDialog.ShowDialog();
        if (print == true)
        {
            XpsDocument xpsDocument = new XpsDocument("C:\\FixedDocumentSequence.xps", FileAccess.ReadWrite);
            FixedDocumentSequence fixedDocSeq = xpsDocument.GetFixedDocumentSequence();
            pDialog.PrintDocument(fixedDocSeq.DocumentPaginator, "Test print job");
        }
    }
Private Sub InvokePrint(ByVal sender As Object, ByVal e As RoutedEventArgs)
        ' Create the print dialog object and set options
        Dim pDialog As New PrintDialog()
        pDialog.PageRangeSelection = PageRangeSelection.AllPages
        pDialog.UserPageRangeEnabled = True

        ' Display the dialog. This returns true if the user presses the Print button.
        Dim print? As Boolean = pDialog.ShowDialog()
        If print = True Then
            Dim xpsDocument As New XpsDocument("C:\FixedDocumentSequence.xps", FileAccess.ReadWrite)
            Dim fixedDocSeq As FixedDocumentSequence = xpsDocument.GetFixedDocumentSequence()
            pDialog.PrintDocument(fixedDocSeq.DocumentPaginator, "Test print job")
        End If
End Sub

설명

값이이 열거형은 주로 사용 합니다 PageRangeSelection 의 속성을 PrintDialog.

적용 대상