LoadFromBinary メソッドは、印刷ドキュメントのプロパティ設定およびレイアウトを永続化するために SaveAsBinary(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); }