Επεξεργασία

Κοινή χρήση μέσω


Chart.LoadTemplate Method

Definition

Loads a template into the Chart control from a specified source.

Overloads

LoadTemplate(String)

Loads a template with the specified filename from the disk.

LoadTemplate(Stream)

Loads a template into the Chart control from an image stream.

LoadTemplate(String)

Loads a template with the specified filename from the disk.

public:
 void LoadTemplate(System::String ^ name);
public void LoadTemplate (string name);
member this.LoadTemplate : string -> unit
Public Sub LoadTemplate (name As String)

Parameters

name
String

The file name of the template to load. You must specify the full path of the template to be loaded from the disk.

Remarks

The name parameter must use a full path, for example, C:\MyPic.jpg. Note that you must also specify the file extension.

This method loads a template from disk that was saved using the Save method.

Make sure to set the IsTemplateMode property to true before saving the template with the Save method.

If a loaded template has two data series, the appearance properties of the series are applied sequentially to the chart. In other words, the first template series appearance properties are assigned to the first series of the chart, the second template series appearance properties are applied to the second series of the chart, then the first template series is used again for the third series of the chart, and so on. The same holds true for chart areas, and any other collections that have appearance properties.

Templates can be used to simulate custom palettes.

Applies to

LoadTemplate(Stream)

Loads a template into the Chart control from an image stream.

public:
 void LoadTemplate(System::IO::Stream ^ stream);
public void LoadTemplate (System.IO.Stream stream);
member this.LoadTemplate : System.IO.Stream -> unit
Public Sub LoadTemplate (stream As Stream)

Parameters

stream
Stream

The stream to load from.

Remarks

Use this method if you want to load a template from a stream, such as a memory stream, file stream, and so forth.

Make sure to set the IsTemplateMode property to true before saving the template with the Save method.

If a loaded template has two data series, the appearance properties of the series are applied sequentially to the chart. In other words, the first template series appearance properties are assigned to the first series of the chart, the second template series appearance properties are applied to the second series of the chart, then the first template series is used again for the third series of the chart, and so on. The same holds true for chart areas, and any other collections that have appearance properties.

Templates can be used to simulate custom palettes.

Applies to