Version

LoadPreset(Stream,Boolean) Method

Sets properties on the control that effect Appearance, Behavior, or Both, based on the information in the predefined Preset File.
Syntax
'Declaration
 
Public Overloads Sub LoadPreset( _
   ByVal stream As Stream, _
   ByVal reset As Boolean _
) 
public void LoadPreset( 
   Stream stream,
   bool reset
)

Parameters

stream
A Stream that references a Preset File. The stream will not be closed at the end of the call, and should be closed afterwards.
reset
Whether to reset all properties on the control before applying the preset.
Example
Dim fs As System.IO.FileStream =  New System.IO.FileStream(Me.Page.MapPath("./Onyx.xml"),System.IO.FileMode.Open,System.IO.FileAccess.Read) 
Me.WebControl.LoadPreset(fs,True)
fs.Close()
System.IO.FileStream fs = new System.IO.FileStream(this.Page.MapPath("./Onyx.xml"), System.IO.FileMode.Open, System.IO.FileAccess.Read);
this.WebControl.LoadPreset(fs,true);
fs.Close();
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, 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

See Also