When the SaveAsXml(Stream) or the SaveAsBinary(Stream) method is invoked to save the layout and properties of the tabs and tabgroups, the StoreTab is invoked for each tab managed by the UltraTabbedMdiManager. It is recommended that you set this property in that event to a serializable object (e.g. string) that contains enough information to create the appropriate form when deserialized. When the UltraTabbedMdiManager.LoadFromXml or UltraTabbedMdiManager.LoadFromBinary method is invoked, the RestoreTab event is invoked. The event provides the deserialized MdiTab so you may access the serialized PersistedInfo and create the appropriate Form.
Note: This property is not used by the MdiTab but exists to aid in deserialization. If set, the value must be serializable (see System.Type.IsSerializable).
Imports Infragistics.Win Imports Infragistics.Win.UltraWinTabs Imports Infragistics.Win.UltraWinTabbedMdi Private Sub ultraTabbedMdiManager1_StoreTab(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinTabbedMdi.StoreTabEventArgs) Handles ultraTabbedMdiManager1.StoreTab ' The 'StoreTab' event is invoked when the SaveAsXml or ' SaveAsBinary method is invoked. It is a convenient place ' to initialize the 'PersistedInfo' property of the tabs ' immediately prior to serialization and is invoked once for ' each MdiTab in the TabGroups and in the HiddenTabs. This ' will prevent the need to keep updating the PersistedInfo ' at other points when the information needed to deserialize ' the tab changes - e.g. when the file name of the associated ' form changes. If TypeOf e.Tab.Form Is EditForm Then e.Tab.PersistedInfo = (CType(e.Tab.Form, EditForm)).FileName Else e.Tab.PersistedInfo = e.Tab.Form.Text End If End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinTabs; using Infragistics.Win.UltraWinTabbedMdi; private void ultraTabbedMdiManager1_StoreTab(object sender, Infragistics.Win.UltraWinTabbedMdi.StoreTabEventArgs e) { // The 'StoreTab' event is invoked when the SaveAsXml or // SaveAsBinary method is invoked. It is a convenient place // to initialize the 'PersistedInfo' property of the tabs // immediately prior to serialization and is invoked once for // each MdiTab in the TabGroups and in the HiddenTabs. This // will prevent the need to keep updating the PersistedInfo // at other points when the information needed to deserialize // the tab changes - e.g. when the file name of the associated // form changes. if (e.Tab.Form is EditForm) e.Tab.PersistedInfo = ((EditForm)e.Tab.Form).FileName; else e.Tab.PersistedInfo = e.Tab.Form.Text; }
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