Creates a MapLegend from an XML string.
This method should be called once from within a web application. The code should be placed in the Page_Load method inside of a test for IsPostBack
This sample shows how to call the InitializeLegend method.
private void Page_Load(object sender, System.EventArgs e)
{
MapImage1.MapSessionCollection.Add(MapSession1);
MapImage1.Legend = MapLegend1;
MapImage1.Bind();
if (!(Page.IsPostBack))
{
StreamReader sr = new StreamReader(@"C:\Clients\OakRidge\support\Legend.xml");
string LegendXML = sr.ReadToEnd();
sr.Close();
MapLegend1.InitalizeLegend(LegendXML);
// The rest of initialition code follows...
MapLegend Class | MapMatrix.WebUI.WebControls Namespace