AnnotationDocumentPaginator Oluşturucular
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
AnnotationDocumentPaginator sınıfının yeni bir örneğini başlatır.
Aşırı Yüklemeler
| Name | Description |
|---|---|
| AnnotationDocumentPaginator(DocumentPaginator, Stream) |
Belirtilen AnnotationDocumentPaginator ve ek açıklama depolama DocumentPaginatoralanına Stream göre sınıfının yeni bir örneğini başlatır. |
| AnnotationDocumentPaginator(DocumentPaginator, AnnotationStore) |
Belirtilen AnnotationDocumentPaginator ve DocumentPaginatortemelinde sınıfının yeni bir örneğini AnnotationStore başlatır. |
| AnnotationDocumentPaginator(DocumentPaginator, Stream, FlowDirection) |
Belirtilen AnnotationDocumentPaginator, ek açıklama depolama DocumentPaginatoralanı Stream ve metnine FlowDirectiongöre sınıfının yeni bir örneğini başlatır. |
| AnnotationDocumentPaginator(DocumentPaginator, AnnotationStore, FlowDirection) |
Belirtilen AnnotationDocumentPaginator, DocumentPaginatorve metnini AnnotationStoretemel alarak sınıfının yeni bir örneğini FlowDirection başlatır. |
Açıklamalar
sınıfı, AnnotationDocumentPaginator yazdırma için sayfalara DocumentPaginator kullanıcı ek açıklamalarını eklemek için belirtilen öğesini oluşturucuya sarmalarAnnotationDocumentPaginator.
AnnotationDocumentPaginator(DocumentPaginator, Stream)
Belirtilen AnnotationDocumentPaginator ve ek açıklama depolama DocumentPaginatoralanına Stream göre sınıfının yeni bir örneğini başlatır.
public:
AnnotationDocumentPaginator(System::Windows::Documents::DocumentPaginator ^ originalPaginator, System::IO::Stream ^ annotationStore);
public AnnotationDocumentPaginator(System.Windows.Documents.DocumentPaginator originalPaginator, System.IO.Stream annotationStore);
new System.Windows.Annotations.AnnotationDocumentPaginator : System.Windows.Documents.DocumentPaginator * System.IO.Stream -> System.Windows.Annotations.AnnotationDocumentPaginator
Public Sub New (originalPaginator As DocumentPaginator, annotationStore As Stream)
Parametreler
- originalPaginator
- DocumentPaginator
Yazdırılan ek açıklamaların ekleneceği belge.
- annotationStore
- Stream
Ek açıklamaları almak için ek açıklama depolama akışı.
Açıklamalar
Varsayılan olarak, bu oluşturucu metin akışı yönünü olarak LeftToRightayarlar. Gerekirse alternatif AnnotationDocumentPaginator oluşturucu aşırı yüklemelerinden birini kullanarak metni FlowDirection farklı bir ayara ayarlayabilirsiniz.
sınıfı, AnnotationDocumentPaginator yazdırma için sayfalara DocumentPaginator kullanıcı ek açıklamalarını eklemek için belirtilen öğesini oluşturucuya sarmalarAnnotationDocumentPaginator.
Şunlara uygulanır
AnnotationDocumentPaginator(DocumentPaginator, AnnotationStore)
Belirtilen AnnotationDocumentPaginator ve DocumentPaginatortemelinde sınıfının yeni bir örneğini AnnotationStore başlatır.
public:
AnnotationDocumentPaginator(System::Windows::Documents::DocumentPaginator ^ originalPaginator, System::Windows::Annotations::Storage::AnnotationStore ^ annotationStore);
public AnnotationDocumentPaginator(System.Windows.Documents.DocumentPaginator originalPaginator, System.Windows.Annotations.Storage.AnnotationStore annotationStore);
new System.Windows.Annotations.AnnotationDocumentPaginator : System.Windows.Documents.DocumentPaginator * System.Windows.Annotations.Storage.AnnotationStore -> System.Windows.Annotations.AnnotationDocumentPaginator
Public Sub New (originalPaginator As DocumentPaginator, annotationStore As AnnotationStore)
Parametreler
- originalPaginator
- DocumentPaginator
Yazdırılan ek açıklamaların ekleneceği belge.
- annotationStore
- AnnotationStore
Ek açıklamaları almak için depo.
Örnekler
Aşağıdaki örnekte oluşturucunun kullanımı gösterilmektedir AnnotationDocumentPaginator .
PrintDialog prntDialog = new PrintDialog();
if ((bool)prntDialog.ShowDialog())
{
// XpsDocumentWriter.Write() may change the current
// directory to "My Documents" or another user selected
// directory for storing the print document. Save the
// current directory and restore it after calling Write().
string docDir = Directory.GetCurrentDirectory();
// Create and XpsDocumentWriter for the selected printer.
XpsDocumentWriter xdw = PrintQueue.CreateXpsDocumentWriter(
prntDialog.PrintQueue);
// Print the document with annotations.
try
{
xdw.Write(_annotHelper.GetAnnotationDocumentPaginator(
_xpsDocument.GetFixedDocumentSequence()));
}
catch (PrintingCanceledException)
{
// If in the PrintDialog the user chooses a file-based
// output, such as the "MS Office Document Image Writer",
// the user confirms or specifies the actual output
// filename when the xdw.write operation executes.
// If the user clicks "Cancel" in the filename
// dialog a PrintingCanceledException is thrown
// which we catch here and ignore.
// MessageBox.Show("Print output cancelled");
}
// Restore the original document directory to "current".
Directory.SetCurrentDirectory(docDir);
}
Dim prntDialog As New PrintDialog()
If CBool(prntDialog.ShowDialog()) Then
' XpsDocumentWriter.Write() may change the current
' directory to "My Documents" or another user selected
' directory for storing the print document. Save the
' current directory and restore it after calling Write().
Dim docDir As String = Directory.GetCurrentDirectory()
' Create and XpsDocumentWriter for the selected printer.
Dim xdw As XpsDocumentWriter = PrintQueue.CreateXpsDocumentWriter(prntDialog.PrintQueue)
' Print the document with annotations.
Try
xdw.Write(_annotHelper.GetAnnotationDocumentPaginator(_xpsDocument.GetFixedDocumentSequence()))
Catch e1 As PrintingCanceledException
' If in the PrintDialog the user chooses a file-based
' output, such as the "MS Office Document Image Writer",
' the user confirms or specifies the actual output
' filename when the xdw.write operation executes.
' If the user clicks "Cancel" in the filename
' dialog a PrintingCanceledException is thrown
' which we catch here and ignore.
End Try
' Restore the original document directory to "current".
Directory.SetCurrentDirectory(docDir)
End If
// ------------------ GetAnnotationDocumentPaginator ------------------
/// <summary>
/// Returns a paginator for printing annotations.</summary>
/// <param name="fds">
/// The FixedDocumentSequence containing
/// the annotations to print.</param>
/// <returns>
/// An paginator for printing the document's annotations.</returns>
public AnnotationDocumentPaginator GetAnnotationDocumentPaginator(
FixedDocumentSequence fds)
{
return new AnnotationDocumentPaginator(
fds.DocumentPaginator, _annotService.Store);
}
' ------------------ GetAnnotationDocumentPaginator ------------------
''' <summary>
''' Returns a paginator for printing annotations.</summary>
''' <param name="fds">
''' The FixedDocumentSequence containing
''' the annotations to print.</param>
''' <returns>
''' An paginator for printing the document's annotations.</returns>
Public Function GetAnnotationDocumentPaginator(ByVal fds As FixedDocumentSequence) As AnnotationDocumentPaginator
Return New AnnotationDocumentPaginator(fds.DocumentPaginator, _annotService.Store)
End Function
Açıklamalar
Varsayılan olarak, bu oluşturucu metin akışı yönünü olarak LeftToRightayarlar. Gerekirse alternatif AnnotationDocumentPaginator oluşturucu aşırı yüklemelerinden birini kullanarak metni FlowDirection farklı bir ayara ayarlayabilirsiniz.
sınıfı, AnnotationDocumentPaginator yazdırma için sayfalara DocumentPaginator kullanıcı ek açıklamalarını eklemek için belirtilen öğesini oluşturucuya sarmalarAnnotationDocumentPaginator.
Şunlara uygulanır
AnnotationDocumentPaginator(DocumentPaginator, Stream, FlowDirection)
Belirtilen AnnotationDocumentPaginator, ek açıklama depolama DocumentPaginatoralanı Stream ve metnine FlowDirectiongöre sınıfının yeni bir örneğini başlatır.
public:
AnnotationDocumentPaginator(System::Windows::Documents::DocumentPaginator ^ originalPaginator, System::IO::Stream ^ annotationStore, System::Windows::FlowDirection flowDirection);
public AnnotationDocumentPaginator(System.Windows.Documents.DocumentPaginator originalPaginator, System.IO.Stream annotationStore, System.Windows.FlowDirection flowDirection);
new System.Windows.Annotations.AnnotationDocumentPaginator : System.Windows.Documents.DocumentPaginator * System.IO.Stream * System.Windows.FlowDirection -> System.Windows.Annotations.AnnotationDocumentPaginator
Public Sub New (originalPaginator As DocumentPaginator, annotationStore As Stream, flowDirection As FlowDirection)
Parametreler
- originalPaginator
- DocumentPaginator
Yazdırılan ek açıklamaların ekleneceği belge.
- annotationStore
- Stream
Ek açıklamaları almak için ek açıklama depolama akışı.
- flowDirection
- FlowDirection
Metin akışı yönü LeftToRight veya RightToLeft.
Açıklamalar
sınıfı, AnnotationDocumentPaginator yazdırma için sayfalara DocumentPaginator kullanıcı ek açıklamalarını eklemek için belirtilen öğesini oluşturucuya sarmalarAnnotationDocumentPaginator.
Şunlara uygulanır
AnnotationDocumentPaginator(DocumentPaginator, AnnotationStore, FlowDirection)
Belirtilen AnnotationDocumentPaginator, DocumentPaginatorve metnini AnnotationStoretemel alarak sınıfının yeni bir örneğini FlowDirection başlatır.
public:
AnnotationDocumentPaginator(System::Windows::Documents::DocumentPaginator ^ originalPaginator, System::Windows::Annotations::Storage::AnnotationStore ^ annotationStore, System::Windows::FlowDirection flowDirection);
public AnnotationDocumentPaginator(System.Windows.Documents.DocumentPaginator originalPaginator, System.Windows.Annotations.Storage.AnnotationStore annotationStore, System.Windows.FlowDirection flowDirection);
new System.Windows.Annotations.AnnotationDocumentPaginator : System.Windows.Documents.DocumentPaginator * System.Windows.Annotations.Storage.AnnotationStore * System.Windows.FlowDirection -> System.Windows.Annotations.AnnotationDocumentPaginator
Public Sub New (originalPaginator As DocumentPaginator, annotationStore As AnnotationStore, flowDirection As FlowDirection)
Parametreler
- originalPaginator
- DocumentPaginator
Yazdırılan ek açıklamaların ekleneceği belge.
- annotationStore
- AnnotationStore
Ek açıklamaları almak için depo.
- flowDirection
- FlowDirection
Metin akışı yönü LeftToRight veya RightToLeft.
Açıklamalar
sınıfı, AnnotationDocumentPaginator yazdırma için sayfalara DocumentPaginator kullanıcı ek açıklamalarını eklemek için belirtilen öğesini oluşturucuya sarmalarAnnotationDocumentPaginator.