Share via


BitmapExportContextExtensions.WriteToFile(BitmapExportContext, String) Method

Definition

Writes the bitmap data from the export context to a file.

public:
[System::Runtime::CompilerServices::Extension]
 static void WriteToFile(Microsoft::Maui::Graphics::BitmapExportContext ^ exportContext, System::String ^ filename);
public static void WriteToFile(this Microsoft.Maui.Graphics.BitmapExportContext exportContext, string filename);
static member WriteToFile : Microsoft.Maui.Graphics.BitmapExportContext * string -> unit
<Extension()>
Public Sub WriteToFile (exportContext As BitmapExportContext, filename As String)

Parameters

exportContext
BitmapExportContext

The bitmap export context containing the image data.

filename
String

The path to the file where the image should be saved.

Exceptions

Thrown when exportContext or filename is null.

Thrown when an I/O error occurs while writing to the file.

Applies to