PageRangeSelection Sabit listesi

Tanım

Tüm sayfaların mı yoksa yalnızca sınırlı bir aralığın mı bir işlem tarafından(genellikle yazdırma) işlenip işlenmeyeceğini belirtir.

C#
public enum PageRangeSelection
Devralma
PageRangeSelection

Alanlar

AllPages 0

Tüm sayfalar.

CurrentPage 2

Geçerli sayfa.

SelectedPages 3

Seçili sayfalar.

UserPages 1

Kullanıcı tarafından belirtilen sayfa aralığı.

Örnekler

Aşağıdaki örnekte, Genişletilebilir Uygulama Biçimlendirme Dili (XAML) ve kod kullanarak özelliği ayarlamak için numaralandırmanın PageRangeSelection nasıl kullanılacağı gösterilmektedir.

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

...

C#
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");
        }
    }

Açıklamalar

Bu numaralandırma öncelikle PrintDialog özelliğinin PageRangeSelection değeri olarak kullanılır.

Şunlara uygulanır

Ürün Sürümler
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8
Windows Desktop 3.0, 3.1, 5, 6, 7