バージョン

SaveAsBinary(Stream) メソッド

プロパティ情報をバイナリ形式でファイルに保存します。
シンタックス
'宣言
 
Public Overloads Sub SaveAsBinary( _
   ByVal stream As Stream _
) 
public void SaveAsBinary( 
   Stream stream
)

パラメータ

stream
プロパティ情報を保存するための System.IO.Stream
解説

SaveAsBinary メソッドは、印刷ドキュメントのプロパティ設定を永続化するために LoadFromBinary(Stream) メソッドと組み合わせて使用します。

使用例
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.Printing

    Private binaryMemoryStream As System.IO.MemoryStream = Nothing

    Private Sub btnBinarySave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBinarySave.Click
        If Not Me.binaryMemoryStream Is Nothing Then
            Me.binaryMemoryStream.Close()
        End If

        Me.binaryMemoryStream = New System.IO.MemoryStream()

        Me.UltraPrintDocument1.SaveAsBinary(Me.binaryMemoryStream)
    End Sub

    Private Sub btnBinaryLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBinaryLoad.Click
        If Me.binaryMemoryStream Is Nothing Then
            Return
        End If

        Me.binaryMemoryStream.Position = 0
        Me.UltraPrintDocument1.LoadFromBinary(Me.binaryMemoryStream)
    End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.Printing;

		private System.IO.MemoryStream		binaryMemoryStream = null;

		private void btnBinarySave_Click(object sender, System.EventArgs e)
		{
			if (this.binaryMemoryStream != null)
				this.binaryMemoryStream.Close();

			this.binaryMemoryStream = new System.IO.MemoryStream();

			this.ultraPrintDocument1.SaveAsBinary(this.binaryMemoryStream);
		}

		private void btnBinaryLoad_Click(object sender, System.EventArgs e)
		{
			if (this.binaryMemoryStream == null)
				return;

			this.binaryMemoryStream.Position = 0;
			this.ultraPrintDocument1.LoadFromBinary(this.binaryMemoryStream);
		}
参照