Apr 19, 2010

How to set a Navigation tool as active tool on page load in MaxExtrem 6.8.0

Set Zoom-In Tool as Active Tool on Page Load:
Usually the sample applications that map extreme provide have no tools set as a default active tool.
We need to select the tool(say ZoomIn tool or Zoom out etc as per our requirements). But while developing applications for customer requirement we may need to set some tool as active tool so as to simply the customer process.

Below is the method used to set the Zoom-In tool as the Active tool on page load.
private void SetActiveTool(string toolName)
        string activateCode = String.Format("{0}Tool.Activate();", "ctl00$ContentPlaceHolder1$" + toolName);
        string activateScript = String.Format("<script type='text/javascript'>AppendScriptToForm('{0}');</script>", activateCode);
        Page.RegisterStartupScript("Key1", activateScript);

The above code applies for the Master Pages. You can directly provide the tool name in normal page scenario.

How to Expand and Collapse a rad Sliding pane from client side while using Master Pages.

Below is the code used to Expand the Rad Sliding Pane:

       // finds the Rad sliding zone first in which the pane resides
        var slidingZone = $find("<%= SlidingZone1.ClientID %>");
       // finds the Rad sliding pane need to be expanded.
        var pane = $find("<%= SlidingPane1.ClientID %>");
       // Expands the pane

      // To collapse the pane 

Apr 5, 2010

How to stretch the contents of the web page to its full extent without margin?

This is because the default margin has some values set when we create a web page. so set the margin to 0 to 
stretch your page content to the full extent of the web page using the CSS.

<style type="text/css">
body {
 margin-top: 0px;
 margin-right: 0px;
 margin-bottom: 0px;
 margin-left: 0px

Or even simplied as

<style type="text/css">
body {
 margin : 0px;