C# Class Catel.Services.ViewExportService

The ViewExportService interface.
Inheritance: Catel.Services.ServiceBase, IViewExportService
Afficher le fichier Open project: Catel/Catel

Méthodes publiques

Méthode Description
Export ( IViewModel viewModel, ExportMode exportMode = ExportMode.Print, double dpiX = 96, double dpiY = 96 ) : void

Exports the viewModel's view to the print or clipboard or file.

If exportMode is ExportMode.Print then the dpiX and dpiY argument will be ignored.

ViewExportService ( IViewManager viewManager, ISaveFileService saveFileService ) : System

Initializes a new instance of the ViewExportService class.

Private Methods

Méthode Description
ConvertWritableBitmapToByteArray ( System.Windows.Media.Imaging.WriteableBitmap bmp ) : byte[]

TODO: Create an extension method

CreateImageFromUIElement ( UIElement element, double dpiX, double dpiY ) : System.Windows.Media.Imaging.BitmapSource
Print ( System.Windows.Media.Imaging.BitmapSource bitmap ) : void

Prints a UIElement.

SaveToFile ( System.Windows.Media.Imaging.BitmapSource bitmap ) : void

The save to file.

SerializeIntoByteArray ( int value, byte array, int offset ) : void

Serializes an integer into a byte array

TODO: Create an extension method

Method Details

Export() public méthode

Exports the viewModel's view to the print or clipboard or file.
If exportMode is ExportMode.Print then the dpiX and dpiY argument will be ignored.
The is null.
public Export ( IViewModel viewModel, ExportMode exportMode = ExportMode.Print, double dpiX = 96, double dpiY = 96 ) : void
viewModel IViewModel The view model.
exportMode ExportMode The export mode.
dpiX double The dpi X.
dpiY double The dpi Y.
Résultat void

ViewExportService() public méthode

Initializes a new instance of the ViewExportService class.
The is null. The is null.
public ViewExportService ( IViewManager viewManager, ISaveFileService saveFileService ) : System
viewManager IViewManager The view manager.
saveFileService ISaveFileService The save file service.
Résultat System