The SaveAsBinary method is used in conjunction with the LoadFromBinary(Stream) method to persist the property settings and layout of the UltraTabbedMdiManager. All property settings (except the ImageList) are serialized including the MdiTab objects and TabGroups. When the method is invoked, the StoreTab event is invoked for each MdiTab so that the PersistedInfo may be updated. This property will be available upon deserialization and should be set to a value that can be used to create the appropriate form in the RestoreTab event.
Imports Infragistics.Win Imports Infragistics.Win.UltraWinTabs Imports Infragistics.Win.UltraWinTabbedMdi Private Sub SaveBinaryLayout() Dim path As String = System.IO.Path.GetDirectoryName(Application.ExecutablePath) Dim fileName As String = path + "\\TabbedMdiLayout.dat" Dim fs As System.IO.FileStream = New System.IO.FileStream(fileName, System.IO.FileMode.OpenOrCreate) Try fs.Seek(0, System.IO.SeekOrigin.Begin) Me.ultraTabbedMdiManager1.SaveAsBinary(fs) Finally fs.Close() End Try End Sub Private Sub LoadBinaryLayout() Dim path As String = System.IO.Path.GetDirectoryName(Application.ExecutablePath) Dim fileName As String = path + "\\TabbedMdiLayout.dat" Dim fs As System.IO.FileStream = Nothing If Not System.IO.File.Exists(fileName) Then Return End If Try fs = New System.IO.FileStream(fileName, System.IO.FileMode.Open) fs.Seek(0, System.IO.SeekOrigin.Begin) Me.ultraTabbedMdiManager1.LoadFromBinary(fs) Finally If Not fs Is Nothing Then fs.Close() End If End Try End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinTabs; using Infragistics.Win.UltraWinTabbedMdi; private void SaveBinaryLayout() { string path = System.IO.Path.GetDirectoryName(Application.ExecutablePath); string fileName = path + "\\TabbedMdiLayout.dat"; System.IO.FileStream fs = new System.IO.FileStream(fileName, System.IO.FileMode.OpenOrCreate); try { fs.Seek(0, System.IO.SeekOrigin.Begin); this.ultraTabbedMdiManager1.SaveAsBinary(fs); } finally { fs.Close(); } } private void LoadBinaryLayout() { string path = System.IO.Path.GetDirectoryName(Application.ExecutablePath); string fileName = path + "\\TabbedMdiLayout.dat"; System.IO.FileStream fs = null; if (!System.IO.File.Exists(fileName)) return; try { fs = new System.IO.FileStream(fileName, System.IO.FileMode.Open); fs.Seek(0, System.IO.SeekOrigin.Begin); this.ultraTabbedMdiManager1.LoadFromBinary(fs); } finally { if (fs != null) fs.Close(); } }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2