Class DataProviderViewModel

This example demonstrates how to open and export a PDF using a DataProvider and DataSink. It uses RandomAccessStreamDataProvider and RandomAccessStreamDataSink which simply wrap a Windows.Storage.Streams.IRandomAccessStream.

Inheritance
System.Object
DataProviderViewModel
Implements
System.ComponentModel.INotifyPropertyChanged
Namespace: Catalog.ViewModels
Assembly: Catalog.dll
Syntax
public class DataProviderViewModel : Observable, INotifyPropertyChanged

Properties

FlattenAnnotations

Declaration
public bool FlattenAnnotations { get; set; }
Property Value
Type Description
System.Boolean

IncrementalSave

Declaration
public bool IncrementalSave { get; set; }
Property Value
Type Description
System.Boolean

OpenPDFCommand

Declaration
public ICommand OpenPDFCommand { get; }
Property Value
Type Description
System.Windows.Input.ICommand

PDFView

Declaration
public PdfView PDFView { get; }
Property Value
Type Description
PdfView

SavePDFCommand

Declaration
public ICommand SavePDFCommand { get; }
Property Value
Type Description
System.Windows.Input.ICommand

Methods

Initialize(PdfView)

Declaration
public void Initialize(PdfView pdfView)
Parameters
Type Name Description
PdfView pdfView

OpenPDFAsync()

Declaration
public async void OpenPDFAsync()

SavePDFAsync()

Save to the same file that was opened. If annotations are flattened they will be flattened in the open document too.

Declaration
public async void SavePDFAsync()

ViewUnloaded()

Declaration
public void ViewUnloaded()

Implements

System.ComponentModel.INotifyPropertyChanged