<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>[How Do I:] Use the ASP.NET AJAX ResizableControl Extender?</title><link>http://asp.net</link><pubDate>Wed, 16 Jun 2010 17:42:36 GMT</pubDate><generator>umbraco</generator><description>Comments for [How Do I:] Use the ASP.NET AJAX ResizableControl Extender?</description><language>en</language><atom:link href="http://asp.net/rss/comments/33585" rel="self" type="application/rss+xml" /><item><title>Comment Posted by cv_vikram</title><link>http://asp.net/web-forms/videos/ajax-control-toolkit/how-do-i-use-the-aspnet-ajax-resizablecontrol-extender</link><pubDate>Thu, 07 Aug 2008 08:06:51 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000001443</guid><description><![CDATA[ <p>Good tutorial..thanks</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/cv_vikram.jpg?forceidenticon=false&amp;dt=635047210800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by bilgin84</title><link>http://asp.net/web-forms/videos/ajax-control-toolkit/how-do-i-use-the-aspnet-ajax-resizablecontrol-extender</link><pubDate>Mon, 30 Mar 2009 02:24:15 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000001444</guid><description><![CDATA[ <p>tahnks..!</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/bilgin84.jpg?forceidenticon=false&amp;dt=635047210800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by JFairbanks</title><link>http://asp.net/web-forms/videos/ajax-control-toolkit/how-do-i-use-the-aspnet-ajax-resizablecontrol-extender</link><pubDate>Wed, 20 May 2009 20:16:50 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000001445</guid><description><![CDATA[ <p>Is there a way to, instead of having the resize handle in the lower right, to have, say an entire edge of a text box or div be the handle to only allow resizing in one dimension?</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/JFairbanks.jpg?forceidenticon=false&amp;dt=635047210800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by geershuang</title><link>http://asp.net/web-forms/videos/ajax-control-toolkit/how-do-i-use-the-aspnet-ajax-resizablecontrol-extender</link><pubDate>Tue, 28 Jul 2009 16:31:45 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000001446</guid><description><![CDATA[ <p>This is a great video. Thanks for sharing.</p><p>However, I found a little problem - the handle image doesn&#39;t position itself well when the Panel is scrollable. The image will not stay at the lower-right corner when you scroll the content with the roller on your mouse. It does stay at the right place when you drag the scroll bar up and down.</p><p>Any solutions? Thanks in advance!</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/geershuang.jpg?forceidenticon=false&amp;dt=635047210800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by renukagolla</title><link>http://asp.net/web-forms/videos/ajax-control-toolkit/how-do-i-use-the-aspnet-ajax-resizablecontrol-extender</link><pubDate>Tue, 10 Nov 2009 16:28:45 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000001447</guid><description><![CDATA[ <p>hai there</p><p>i have the same problem.when the panel is scrolled vertically the image will not stay at lower right corner.</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/renukagolla.jpg?forceidenticon=false&amp;dt=635047210800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by smcherniss</title><link>http://asp.net/web-forms/videos/ajax-control-toolkit/how-do-i-use-the-aspnet-ajax-resizablecontrol-extender</link><pubDate>Wed, 16 Jun 2010 17:42:36 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000009119</guid><description><![CDATA[ <p>I modified the ResizableControlBehavior.js file to only display the image when the User hovers over the Text Box. This will ensure it will not vertically scroll with the document.</p><p></p><p>It works pretty well for me, I hope it will help someone else out.</p><p></p><p>smcherniss</p><p></p><p>Here is the revised version of the ResizableControlBehavior.js file:</p><p></p><p>// (c) Copyright Microsoft Corporation.</p><p>// This source is subject to the Microsoft Permissive License.</p><p>// See <a rel="nofollow" href="http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx." target="_blank">www.microsoft.com/</a></p><p>// All other rights reserved.</p><p></p><p>// This script has been customized to correct the issue with the Handle Image floating around the document</p><p>// It will no longer display all the time. However, it will display when the user places the cursor </p><p>// over the Target Control</p><p>//   I added a mouseover, and mouseout event for the Target Control. This will faciliate the displaying </p><p>//	 and hiding of the Handle Image DIV</p><p>//	 I modified the Handle Image mouseover and mouseout events to faciliate the displaying and hiding</p><p>//	 of the Handle Image DIV</p><p>//	 I added a custom function _hideDIVTimer. It will be called by a setTimeout when the Target Control ID</p><p>//	 mouseout event is fired. The _hideDIVTimer will hide the Handle Image DIV. The timeout will give </p><p>//	 the Handle Image DIV time to cancel the timeout and prevent the Handle Image DIV from being hidden.</p><p>//	 I had to add a custom function delegate to handle the timeout. _onhideDivTimer$delegate</p><p>//	 I added two delegates for the Target Control mouseover and moustout events:</p><p>//		_onmouseovertargetDelegate</p><p>//		_onmouseouttargetDelegate</p><p>//</p><p>//</p><p>// 16 June 2010</p><p>// Skip M Cherniss</p><p></p><p>Type.registerNamespace(&#39;AjaxControlToolkit&#39;);</p><p></p><p>AjaxControlToolkit.ResizableControlBehavior = function(element) {</p><p>    /// &lt;summary&gt;</p><p>    /// The ResizableControlBehavior makes the target element resizable</p><p>    /// &lt;/summary&gt;</p><p>    /// &lt;param name=&quot;element&quot; type=&quot;Sys.UI.DomElement&quot; domElement=&quot;true&quot;&gt;</p><p>    /// DOM element associated with the behaviro</p><p>    /// &lt;/param&gt;</p><p>    AjaxControlToolkit.ResizableControlBehavior.initializeBase(this, [element]);</p><p>    </p><p>    // Properties</p><p>    this._HandleCssClass = &quot;&quot;;</p><p>    this._ResizableCssClass = &quot;&quot;;</p><p>    this._HandleOffsetX = 0;</p><p>    this._HandleOffsetY = 0;</p><p>    this._MinimumWidth = 0;</p><p>    this._MinimumHeight = 0;</p><p>    this._MaximumWidth = 100000;</p><p>    this._MaximumHeight = 100000;</p><p></p><p>    // Variables</p><p>    this._frame = null;</p><p>    this._handle = null;</p><p>    this._handleHolder = null;</p><p>    this._lining = null;</p><p>    this._tracking = false;</p><p>    this._lastClientX = 0;</p><p>    this._lastClientY = 0;</p><p>    this._hideDivTimeoutId = null;</p><p></p><p>    // Delegates</p><p>    this._onmouseoverDelegate = null;</p><p>    this._onmouseoutDelegate = null;</p><p>    this._onmousedownDelegate = null;</p><p>    this._onmousemoveDelegate = null;</p><p>    this._onmouseupDelegate = null;</p><p>    this._onselectstartDelegate = null;</p><p></p><p>	/////////////////////////////////////////////////////////////////////////////////////////////////</p><p>	// CUSTOM CODE</p><p>	/////////////////////////////////////////////////////////////////////////////////////////////////</p><p></p><p>    // Delegates</p><p>    this._onmouseovertargetDelegate	= null;</p><p>    this._onmouseouttargetDelegate	= null;</p><p>    </p><p>    // Timeout Function Delegate</p><p>    this._onhideDivTimer$delegate = Function.createDelegate(this, this._hideDIVTimer);</p><p>    </p><p>	/////////////////////////////////////////////////////////////////////////////////////////////////																					  </p><p>	// END - CUSTOM CODE</p><p>	/////////////////////////////////////////////////////////////////////////////////////////////////</p><p></p><p>}</p><p>AjaxControlToolkit.ResizableControlBehavior.prototype = {</p><p>    initialize : function() {</p><p>        /// &lt;summary&gt;</p><p>        /// Initialize the behavior</p><p>        /// &lt;/summary&gt;</p><p>        AjaxControlToolkit.ResizableControlBehavior.callBaseMethod(this, &#39;initialize&#39;);</p><p></p><p>        this._frame = this.get_element();</p><p></p><p>        var savedSizeString = AjaxControlToolkit.ResizableControlBehavior.callBaseMethod(this, &#39;get_ClientState&#39;);</p><p>        if (savedSizeString &amp;&amp; (-1 != savedSizeString.indexOf(&#39;,&#39;))) {</p><p>            var savedSize = savedSizeString.split(&#39;,&#39;);</p><p>            this._frame.style.width = savedSize[0]+&#39;px&#39;;</p><p>            this._frame.style.height = savedSize[1]+&#39;px&#39;;</p><p>        }</p><p></p><p>        // The this._lining lets us measure the interior of the this._frame easily and</p><p>        // protects the contents of this._frame (when resizing) from interactions</p><p>        // with the mouse (ex: IFRAME grabbing mouse capture in IE or Firefox)</p><p>        this._lining = document.createElement(&#39;DIV&#39;);</p><p>        this._lining.style.width = CommonToolkitScripts.getCurrentStyle(this._frame, &#39;width&#39;);</p><p>        this._lining.style.height = CommonToolkitScripts.getCurrentStyle(this._frame, &#39;height&#39;);</p><p>        this._lining.style.position = &#39;absolute&#39;;</p><p>        this._lining.style.backgroundColor = &#39;black&#39;;  // Keeps browsers from ignoring the content-free element</p><p>        this._lining.style.opacity = &quot;0&quot;;  // Makes the lining invisible</p><p>        this._lining.style.filter = &quot;progid:DXImageTransform.Microsoft.Alpha(opacity=0)&quot;;  // Ditto, for IE</p><p>        this._lining.style.visibility = &#39;hidden&#39;;</p><p>        this._frame.insertBefore(this._lining, this._frame.firstChild);</p><p></p><p>        // The this._handleHolder provedes a wrapper with absolute positioning</p><p>        // so that this._handle can be absolutely positioned relative to the</p><p>        // this._frame instead of the page</p><p>        this._handleHolder = document.createElement(&#39;DIV&#39;);</p><p>        </p><p>        // Add Id to reference control</p><p>        this._handleHolder.id = this.get_element().id + &#39;ResizableControlBehaviorHandle&#39;;</p><p>        </p><p>        this._handleHolder.style.width = &#39;0px&#39;;</p><p>        this._handleHolder.style.height = &#39;0px&#39;;</p><p>        this._handleHolder.style.position = ((Sys.Browser.agent === Sys.Browser.Opera) ? &#39;relative&#39; : &#39;absolute&#39;);</p><p>        this._frame.insertBefore(this._handleHolder, this._frame.firstChild);</p><p></p><p>        // The this._handle represents the UI handle for the user to grab with</p><p>        // the mouse</p><p>        this._handle = document.createElement(&#39;DIV&#39;);</p><p>        </p><p>        this._handle.className = this._HandleCssClass;</p><p>        this._handle.style.position = &#39;absolute&#39;;</p><p>        this._handleHolder.appendChild(this._handle);</p><p></p><p>		// Hide the Icon until the mouseover event</p><p>		this._handleHolder.style.display=&#39;none&#39;;</p><p></p><p>		/////////////////////////////////////////////////////////////////////////////////////////////////</p><p>		// CUSTOM CODE</p><p>		/////////////////////////////////////////////////////////////////////////////////////////////////</p><p></p><p>		// Add On Mouse Over Event Handler</p><p>		this._onmouseovertargetDelegate = Function.createDelegate(this, this._onmouseovertarget );</p><p>		$addHandler(this.get_element(), &#39;mouseover&#39;, this._onmouseovertargetDelegate);</p><p>										</p><p>		// Add On Mouse Out Event Handler</p><p>		this._onmouseouttargetDelegate = Function.createDelegate(this, this._onmouseouttarget );</p><p>		$addHandler(this.get_element(), &#39;mouseout&#39;, this._onmouseouttargetDelegate);</p><p></p><p>		/////////////////////////////////////////////////////////////////////////////////////////////////																					  </p><p>		// END - CUSTOM CODE</p><p>		/////////////////////////////////////////////////////////////////////////////////////////////////</p><p>		</p><p>        this._onmouseoverDelegate = Function.createDelegate(this, this._onmouseover);</p><p>        $addHandler(this._handle, &#39;mouseover&#39;, this._onmouseoverDelegate);</p><p>        this._onmouseoutDelegate = Function.createDelegate(this, this._onmouseout);</p><p>        $addHandler(this._handle, &#39;mouseout&#39;, this._onmouseoutDelegate);</p><p>        this._onmousedownDelegate = Function.createDelegate(this, this._onmousedown);</p><p>        $addHandler(this._handle, &#39;mousedown&#39;, this._onmousedownDelegate);</p><p>        this._onmousemoveDelegate = Function.createDelegate(this, this._onmousemove);</p><p>        this._onmouseupDelegate = Function.createDelegate(this, this._onmouseup);</p><p>        this._onselectstartDelegate = Function.createDelegate(this, this._onselectstart);</p><p></p><p>        this._resizeControl(0, 0, 0, 0);</p><p>        this._rememberSize();</p><p>    },</p><p></p><p>    dispose : function() {</p><p>        /// &lt;summary&gt;</p><p>        /// Dispose the behavior</p><p>        /// &lt;/summary&gt;</p><p>        if (this._onmouseoverDelegate) {</p><p>            $removeHandler(this._handle, &#39;mouseover&#39;, this._onmouseoverDelegate);</p><p>            this._onmouseoverDelegate = null;</p><p>        }</p><p></p><p>        if (this._onmouseoutDelegate) {</p><p>            $removeHandler(this._handle, &#39;mouseout&#39;, this._onmouseoutDelegate);</p><p>            this._onmouseoutDelegate = null;</p><p>        }</p><p></p><p>        if (this._onmousedownDelegate) {</p><p>            $removeHandler(this._handle, &#39;mousedown&#39;, this._onmousedownDelegate);</p><p>            this._onmousedownDelegate = null;</p><p>        }</p><p></p><p>        if (this._onmousemoveDelegate) {</p><p>            if (this.tracking) {</p><p>                $removeHandler(document, &#39;mousemove&#39;, this._onmousemoveDelegate);</p><p>            }</p><p>            this._onmousemoveDelegate = null;</p><p>        }</p><p></p><p>        if (this._onmouseupDelegate) {</p><p>            if (this.tracking) {</p><p>                $removeHandler(document, &#39;mouseup&#39;, this._onmouseupDelegate);</p><p>            }</p><p>            this._onmouseupDelegate = null;</p><p>        }</p><p></p><p>        if (this._onselectstartDelegate) {</p><p>            if (this.tracking) {</p><p>                $removeHandler(document, &#39;selectstart&#39;, this._onselectstartDelegate);</p><p>                if (Sys.Browser.agent === Sys.Browser.Opera) {</p><p>                    $removeHandler(document, &#39;mousedown&#39;, this._onselectstartDelegate);</p><p>                }</p><p>            }</p><p>            this._onselectstartDelegate = null;</p><p>        }</p><p></p><p>        AjaxControlToolkit.ResizableControlBehavior.callBaseMethod(this, &#39;dispose&#39;);</p><p>    },</p><p></p><p></p><p>		/////////////////////////////////////////////////////////////////////////////////////////////////</p><p>		// CUSTOM CODE</p><p>		/////////////////////////////////////////////////////////////////////////////////////////////////</p><p>		</p><p>	_hideDIVTimer: function() {</p><p>		// This event will fire when the Target Control ID and the Handle Image DIV</p><p>		// loose focus</p><p>		clearTimeout( this._hideDivTimeoutId );	</p><p>		this._hideDivTimeoutId = null;	</p><p>		this._handleHolder.style.display=&#39;none&#39;;</p><p>	},</p><p>			</p><p>	_onmouseovertarget: function() {	</p><p>		/// &lt;summary&gt;</p><p>        /// Display the Handle Image DIV</p><p>        /// &lt;/summary&gt;							   		</p><p>		</p><p>		// clear the timeout that will hide the Handle Image DIV</p><p>        if ( this._hideDivTimeoutId != null )</p><p>        {</p><p>			clearTimeout( this._hideDivTimeoutId );</p><p>			this._hideDivTimeoutId = null;</p><p>		}</p><p>		</p><p>		this._handleHolder.style.display=&#39;block&#39;;</p><p>		</p><p>				</p><p>	</p><p>	},</p><p>						</p><p>	_onmouseouttarget: function() {	</p><p>		/// &lt;summary&gt;</p><p>        /// Set the timeout to hide the Handle Image DIV</p><p>        /// &lt;/summary&gt;		</p><p>        if ( this._hideDivTimeoutId == null )</p><p>        {					   		</p><p>			this._hideDivTimeoutId = setTimeout( this._onhideDivTimer$delegate, 1000 );		</p><p>			</p><p></p><p>		}</p><p>	</p><p>	},</p><p></p><p></p><p>	/////////////////////////////////////////////////////////////////////////////////////////////////</p><p>	// END CUSTOM CODE</p><p>	/////////////////////////////////////////////////////////////////////////////////////////////////</p><p>		</p><p>    _onmouseover : function() {</p><p>        /// &lt;summary&gt;</p><p>        /// Handler for the handle&#39;s mouseover event</p><p>        /// &lt;/summary&gt;</p><p></p><p></p><p>		/////////////////////////////////////////////////////////////////////////////////////////////////</p><p>		// CUSTOM CODE</p><p>		/////////////////////////////////////////////////////////////////////////////////////////////////</p><p>        </p><p>        // Stop the Timeout to hide the Handle Image DIV</p><p>        if ( this._hideDivTimeoutId != null )</p><p>        {</p><p>			clearTimeout( this._hideDivTimeoutId );</p><p>			this._hideDivTimeoutId = null;</p><p>		}</p><p></p><p></p><p>		/////////////////////////////////////////////////////////////////////////////////////////////////</p><p>		// END CUSTOM CODE</p><p>		/////////////////////////////////////////////////////////////////////////////////////////////////</p><p>		</p><p>        Sys.UI.DomElement.addCssClass(this._frame, this._ResizableCssClass);</p><p>		</p><p>    },</p><p></p><p>    _onmouseout : function() {</p><p>        /// &lt;summary&gt;</p><p>        /// Handler for the handle&#39;s mouseout event</p><p>        /// &lt;/summary&gt;</p><p>        if (!this._tracking) {</p><p>            Sys.UI.DomElement.removeCssClass(this._frame, this._ResizableCssClass);</p><p>        }</p><p></p><p></p><p>		/////////////////////////////////////////////////////////////////////////////////////////////////</p><p>		// CUSTOM CODE</p><p>		/////////////////////////////////////////////////////////////////////////////////////////////////</p><p>        </p><p>		// Hide the Handle Image DIV until the mouseover event</p><p>		this._handleHolder.style.display=&#39;none&#39;;</p><p>		</p><p>		</p><p>		/////////////////////////////////////////////////////////////////////////////////////////////////</p><p>		// END CUSTOM CODE</p><p>		/////////////////////////////////////////////////////////////////////////////////////////////////</p><p></p><p>    },</p><p></p><p>    _onmousedown : function(e) {</p><p>        /// &lt;summary&gt;</p><p>        /// Handler for the handle&#39;s mousedown event</p><p>        /// &lt;/summary&gt;</p><p></p><p>        // TODO: Fix for new event model</p><p>        if (!e) {</p><p>            e = event;</p><p>        }</p><p>        this._onmousedownImplementation(e.clientX, e.clientY);</p><p>    },</p><p>    </p><p>    _onmousedownImplementation : function(clientX, clientY) {</p><p>        /// &lt;summary&gt;</p><p>        /// Setup the target for resizing when its handle receives a mousedown event</p><p>        /// &lt;/summary&gt;</p><p>        /// &lt;param name=&quot;clientX&quot; type=&quot;Number&quot; integer=&quot;true&quot;&gt;</p><p>        /// X coordinate of the click</p><p>        /// &lt;/param&gt;</p><p>        /// &lt;param name=&quot;clientY&quot; type=&quot;Number&quot; integer=&quot;true&quot;&gt;</p><p>        /// Y coordinate of the click</p><p>        /// &lt;/param&gt;</p><p></p><p>        this._tracking = true;</p><p>        this._resizeControl(clientX, clientY, 0, 0);</p><p>        this._lining.style.visibility = &#39;visible&#39;;  // Overlay resizing control to avoid interacting with it (ex: IFRAME)</p><p>        $addHandler(document, &#39;mousemove&#39;, this._onmousemoveDelegate);</p><p>        $addHandler(document, &#39;mouseup&#39;, this._onmouseupDelegate);</p><p>        $addHandler(document, &#39;selectstart&#39;, this._onselectstartDelegate);</p><p>        if (Sys.Browser.agent === Sys.Browser.Opera) {</p><p>            $addHandler(document, &#39;mousedown&#39;, this._onselectstartDelegate);</p><p>        }</p><p>        this.raiseResizeBegin();</p><p>    },</p><p></p><p>    _onmousemove : function(e) {</p><p>        /// &lt;summary&gt;</p><p>        /// Handler for the handle&#39;s mousemove event</p><p>        /// &lt;/summary&gt;</p><p></p><p>        // TODO: Fix for new event model</p><p>        if (!e) {</p><p>            e = event;</p><p>        }</p><p>        this._onmousemoveImplementation(e.clientX, e.clientY);</p><p>    },</p><p>    </p><p>    _onmousemoveImplementation : function(clientX, clientY) {</p><p>        /// &lt;summary&gt;</p><p>        /// Resize the target when the handle receives mousemove events</p><p>        /// &lt;/summary&gt;</p><p>        /// &lt;param name=&quot;clientX&quot; type=&quot;Number&quot; integer=&quot;true&quot;&gt;</p><p>        /// X coordinate of the click</p><p>        /// &lt;/param&gt;</p><p>        /// &lt;param name=&quot;clientY&quot; type=&quot;Number&quot; integer=&quot;true&quot;&gt;</p><p>        /// Y coordinate of the click</p><p>        /// &lt;/param&gt;</p><p></p><p>        if (this._tracking) {</p><p>            var deltaX = (clientX-this._lastClientX);</p><p>            var deltaY = (clientY-this._lastClientY);</p><p>            this._resizeControl(clientX, clientY, deltaX, deltaY);</p><p>        }</p><p>    },</p><p></p><p>    _onmouseup : function() {</p><p>        /// &lt;summary&gt;</p><p>        /// Handler for the handle&#39;s mouseup event</p><p>        /// &lt;/summary&gt;</p><p></p><p>        this._tracking = false;</p><p>        this._rememberSize();</p><p>        this._lining.style.visibility = &#39;hidden&#39;;</p><p>        $removeHandler(document, &#39;mousemove&#39;, this._onmousemoveDelegate);</p><p>        $removeHandler(document, &#39;mouseup&#39;, this._onmouseupDelegate);</p><p>        $removeHandler(document, &#39;selectstart&#39;, this._onselectstartDelegate);</p><p>        if (Sys.Browser.agent === Sys.Browser.Opera) {</p><p>            $removeHandler(document, &#39;mousedown&#39;, this._onselectstartDelegate);</p><p>        }</p><p>        Sys.UI.DomElement.removeCssClass(this._frame, this._ResizableCssClass);</p><p>    },</p><p></p><p>    _onselectstart : function(e) {</p><p>        /// &lt;summary&gt;</p><p>        /// Handler for the target&#39;s selectstart event</p><p>        /// &lt;/summary&gt;</p><p>        /// &lt;param name=&quot;e&quot; type=&quot;Sys.UI.DomEvent&quot;&gt;</p><p>        /// Event info</p><p>        /// &lt;/param&gt;</p><p></p><p>        // Don&#39;t allow selection during drag</p><p>        e.preventDefault();</p><p>        return false;</p><p>    },</p><p></p><p>    _resizeControl : function(clientX, clientY, deltaX, deltaY) {</p><p>        /// &lt;summary&gt;</p><p>        /// Resize the target</p><p>        /// &lt;/summary&gt;</p><p>        /// &lt;param name=&quot;clientX&quot; type=&quot;Number&quot; integer=&quot;true&quot;&gt;</p><p>        /// Starting X coordinate</p><p>        /// &lt;/param&gt;</p><p>        /// &lt;param name=&quot;clientY&quot; type=&quot;Number&quot; integer=&quot;true&quot;&gt;</p><p>        /// Starting Y coordinate</p><p>        /// &lt;/param&gt;</p><p>        /// &lt;param name=&quot;deltaX&quot; type=&quot;Number&quot; integer=&quot;true&quot;&gt;</p><p>        /// Change in the width</p><p>        /// &lt;/param&gt;</p><p>        /// &lt;param name=&quot;deltaY&quot; type=&quot;Number&quot; integer=&quot;true&quot;&gt;</p><p>        /// Change in the height</p><p>        /// &lt;/param&gt;</p><p></p><p>        // Save last client X/Y</p><p>        this._lastClientX = clientX;</p><p>        this._lastClientY = clientY;</p><p>        // Calculate new lining/frame width/height</p><p>        var _liningWidth = Math.min(Math.max(this._lining.offsetWidth+deltaX, Math.max(this._MinimumWidth, this._handle.offsetWidth)), this._MaximumWidth);</p><p>        var _liningHeight = Math.min(Math.max(this._lining.offsetHeight+deltaY, Math.max(this._MinimumHeight, this._handle.offsetHeight)), this._MaximumHeight);</p><p>        // Set new lining/frame width/height</p><p>        this._lining.style.width = _liningWidth+&#39;px&#39;;</p><p>        this._lining.style.height = _liningHeight+&#39;px&#39;;</p><p>        this._frame.style.width = _liningWidth+&#39;px&#39;;</p><p>        this._frame.style.height = _liningHeight+&#39;px&#39;;</p><p>        // Calculate new handle left/top</p><p>        var _handleLeft = this._lining.offsetWidth-this._handle.offsetWidth+this._HandleOffsetX;</p><p>        var _handleTop = this._lining.offsetHeight-this._handle.offsetHeight+this._HandleOffsetY;</p><p>        // Set new handle left/top</p><p>        this._handle.style.left = _handleLeft+&#39;px&#39;;</p><p>        this._handle.style.top = _handleTop+&#39;px&#39;;</p><p>        // Raise the resizing event</p><p>        this.raiseResizing();</p><p>    },</p><p></p><p>    _rememberSize : function() {</p><p>        /// &lt;summary&gt;</p><p>        /// Save the size in ClientState</p><p>        /// &lt;/summary&gt;</p><p>        var size = this.get_Size();</p><p>        AjaxControlToolkit.ResizableControlBehavior.callBaseMethod(this, &#39;set_ClientState&#39;, [ size.width+&#39;,&#39;+size.height ]);</p><p>        // Raise the resize event</p><p>        this.raiseResize();</p><p>    },</p><p></p><p>    _measurementToNumber : function(m) {</p><p>        /// &lt;summary&gt;</p><p>        /// Get the magnitude of a measurement</p><p>        /// &lt;/summary&gt;</p><p>        /// &lt;param name=&quot;m&quot; type=&quot;String&quot;&gt;</p><p>        /// Measurement</p><p>        /// &lt;/param&gt;</p><p>        /// &lt;returns type=&quot;String&quot;&gt;</p><p>        /// Magnitude of a measurement</p><p>        /// &lt;/returns&gt;</p><p>        return m.replace(&#39;px&#39;, &#39;&#39;);</p><p>    },</p><p></p><p>    get_HandleCssClass : function() {</p><p>        /// &lt;value type=&quot;String&quot;&gt;</p><p>        /// The name of the CSS class to apply to the resize handle</p><p>        /// &lt;/value&gt;</p><p>        return this._HandleCssClass;</p><p>    },</p><p>    set_HandleCssClass : function(value) {</p><p>        if (this._HandleCssClass) {</p><p>            throw &quot;Changes to HandleCssClass not supported&quot;;</p><p>        }</p><p>        this._HandleCssClass = value;</p><p>        this.raisePropertyChanged(&#39;HandleCssClass&#39;);</p><p>    },</p><p></p><p>    get_ResizableCssClass : function() {</p><p>        /// &lt;value type=&quot;String&quot;&gt;</p><p>        /// name of the CSS class to apply to the element when resizing</p><p>        /// &lt;/value&gt;</p><p>        return this._ResizableCssClass;</p><p>    },</p><p>    set_ResizableCssClass : function(value) {</p><p>        if (this._ResizableCssClass) {</p><p>            throw &quot;Changes to ResizableCssClass not supported&quot;;</p><p>        }</p><p>        this._ResizableCssClass = value;</p><p>        this.raisePropertyChanged(&#39;ResizableCssClass&#39;);</p><p>    },</p><p></p><p>    get_HandleOffsetX : function() {</p><p>        /// &lt;value type=&quot;Number&quot; integer=&quot;true&quot;&gt;</p><p>        /// Horizontal offset to apply to the location of the resize handle</p><p>        /// &lt;/value&gt;</p><p>        return this._HandleOffsetX;</p><p>    },</p><p>    set_HandleOffsetX : function(value) {</p><p>        if (this._HandleOffsetX != value) {</p><p>            this._HandleOffsetX = value;</p><p>            this.raisePropertyChanged(&#39;HandleOffsetX&#39;);</p><p>        }</p><p>    },</p><p></p><p>    get_HandleOffsetY : function() {</p><p>        /// &lt;value type=&quot;Number&quot; integer=&quot;true&quot;&gt;</p><p>        /// Vertical offset to apply to the location of the resize handle</p><p>        /// &lt;/value&gt;</p><p>        return this._HandleOffsetY;</p><p>    },</p><p>    set_HandleOffsetY : function(value) {</p><p>        if (this._HandleOffsetY != value) {</p><p>            this._HandleOffsetY = value;</p><p>            this.raisePropertyChanged(&#39;HandleOffsetY&#39;);</p><p>        }</p><p>    },</p><p></p><p>    get_MinimumWidth : function() {</p><p>        /// &lt;value type=&quot;Number&quot; integer=&quot;true&quot;&gt;</p><p>        /// Minimum width of the resizable element</p><p>        /// &lt;/value&gt;</p><p>        return this._MinimumWidth;</p><p>    },</p><p>    set_MinimumWidth : function(value) {</p><p>        if (this._MinimumWidth != value) {</p><p>            this._MinimumWidth = value;</p><p>            this.raisePropertyChanged(&#39;MinimumWidth&#39;);</p><p>        }</p><p>    },</p><p></p><p>    get_MinimumHeight : function() {</p><p>        /// &lt;value type=&quot;Number&quot; integer=&quot;true&quot;&gt;</p><p>        /// Minimum height of the resizable element</p><p>        /// &lt;/value&gt;</p><p>        return this._MinimumHeight;</p><p>    },</p><p>    set_MinimumHeight : function(value) {</p><p>        if (this._MinimumHeight != value) {</p><p>            this._MinimumHeight = value;</p><p>            this.raisePropertyChanged(&#39;MinimumHeight&#39;);</p><p>        }</p><p>    },</p><p></p><p>    get_MaximumWidth : function() {</p><p>        /// &lt;value type=&quot;Number&quot; integer=&quot;true&quot;&gt;</p><p>        /// Maximum width of the resizing element</p><p>        /// &lt;/value&gt;</p><p>        return this._MaximumWidth;</p><p>    },</p><p>    set_MaximumWidth : function(value) {</p><p>        if (this._MaximumWidth != value) { </p><p>            this._MaximumWidth = value;</p><p>            this.raisePropertyChanged(&#39;MaximumWidth&#39;);</p><p>        }</p><p>    },</p><p></p><p>    get_MaximumHeight : function() {</p><p>        /// &lt;value type=&quot;Number&quot; integer=&quot;true&quot;&gt;</p><p>        /// Maximum height of the resizing element</p><p>        /// &lt;/value&gt;</p><p>        return this._MaximumHeight;</p><p>    },</p><p>    set_MaximumHeight : function(value) {</p><p>        if (this._MaximumHeight != value) {</p><p>            this._MaximumHeight = value;</p><p>            this.raisePropertyChanged(&#39;MaximumHeight&#39;);</p><p>        }</p><p>    },</p><p></p><p>    add_resizing : function(handler) {</p><p>        /// &lt;summary&gt;</p><p>        /// Add a handler to the resizing event</p><p>        /// &lt;/summary&gt;</p><p>        /// &lt;param name=&quot;handler&quot; type=&quot;Function&quot;&gt;</p><p>        /// Handler</p><p>        /// &lt;/param&gt;</p><p>        this.get_events().addHandler(&quot;resizing&quot;, handler);</p><p>    },</p><p>    remove_resizing : function(handler) {</p><p>        /// &lt;summary&gt;</p><p>        /// Remove a handler from the resizing event</p><p>        /// &lt;/summary&gt;</p><p>        /// &lt;param name=&quot;handler&quot; type=&quot;Function&quot;&gt;</p><p>        /// Handler</p><p>        /// &lt;/param&gt;</p><p>        this.get_events().removeHandler(&quot;resizing&quot;, handler);</p><p>    },</p><p>    raiseResizing : function() {</p><p>        /// &lt;summary&gt;</p><p>        /// Raise the resizing event</p><p>        /// &lt;/summary&gt;</p><p>        var onResizingHandler = this.get_events().getHandler(&quot;resizing&quot;);</p><p>        if (onResizingHandler) {</p><p>            onResizingHandler(this, Sys.EventArgs.Empty);</p><p>        }</p><p>    },</p><p></p><p>    get_resizing : function() {</p><p>        /// &lt;value type=&quot;Object&quot;&gt;</p><p>        /// Function to invoke on resizing (can a Function, name of a Function, or expression that evaluates to a Function)</p><p>        /// &lt;/value&gt;</p><p>        return this.get_events().getHandler(&quot;resizing&quot;);</p><p>    },</p><p>    set_resizing : function(value) {</p><p>        if (value &amp;&amp; (0 &lt; value.length)) {</p><p>            var func = CommonToolkitScripts.resolveFunction(value);</p><p>            if (func) { </p><p>                this.add_resizing(func);</p><p>            } else {</p><p>                throw Error.argumentType(&#39;value&#39;, typeof(value), &#39;Function&#39;, &#39;resizing handler not a function, function name, or function text.&#39;);</p><p>            }</p><p>        }</p><p>    },</p><p></p><p>    add_resize : function(handler) {</p><p>        /// &lt;summary&gt;</p><p>        /// Add a handler to the resize event</p><p>        /// &lt;/summary&gt;</p><p>        /// &lt;param name=&quot;handler&quot; type=&quot;Function&quot;&gt;</p><p>        /// Handler</p><p>        /// &lt;/param&gt;</p><p>        this.get_events().addHandler(&quot;resize&quot;, handler);</p><p>    },</p><p>    remove_resize : function(handler) {</p><p>        /// &lt;summary&gt;</p><p>        /// Remove a handler from the resize event</p><p>        /// &lt;/summary&gt;</p><p>        /// &lt;param name=&quot;handler&quot; type=&quot;Function&quot;&gt;</p><p>        /// Handler</p><p>        /// &lt;/param&gt;</p><p>        this.get_events().removeHandler(&quot;resize&quot;, handler);</p><p>    },</p><p>    raiseResize : function() {</p><p>        /// &lt;summary&gt;</p><p>        /// Raise the resize event</p><p>        /// &lt;/summary&gt;</p><p>        var onResizeHandler = this.get_events().getHandler(&quot;resize&quot;);</p><p>        if (onResizeHandler) {</p><p>            onResizeHandler(this, Sys.EventArgs.Empty);</p><p>        }</p><p>    },</p><p></p><p>    get_resize : function() {</p><p>        /// &lt;value type=&quot;Object&quot;&gt;</p><p>        /// Function to invoke on resize (can be a Function, name of a Function, or expression that evaluates to a Function)</p><p>        /// &lt;/value&gt;</p><p>        return this.get_events().getHandler(&quot;resize&quot;);</p><p>    },</p><p>    set_resize : function(value) {</p><p>        if (value &amp;&amp; (0 &lt; value.length)) {</p><p>            var func = CommonToolkitScripts.resolveFunction(value);</p><p>            if (func) { </p><p>                this.add_resize(func);</p><p>            } else {</p><p>                throw Error.argumentType(&#39;value&#39;, typeof(value), &#39;Function&#39;, &#39;resize handler not a function, function name, or function text.&#39;);</p><p>            }</p><p>        }</p><p>    },</p><p></p><p>    add_resizebegin : function(handler) {</p><p>        /// &lt;summary&gt;</p><p>        /// Add a handler to the resizebegin event</p><p>        /// &lt;/summary&gt;</p><p>        /// &lt;param name=&quot;handler&quot; type=&quot;Function&quot;&gt;</p><p>        /// Handler</p><p>        /// &lt;/param&gt;</p><p>        this.get_events().addHandler(&quot;resizebegin&quot;, handler);</p><p>    },</p><p>    remove_resizebegin : function(handler) {</p><p>        /// &lt;summary&gt;</p><p>        /// Remove a handler from the resizebegin event</p><p>        /// &lt;/summary&gt;</p><p>        /// &lt;param name=&quot;handler&quot; type=&quot;Function&quot;&gt;</p><p>        /// Handler</p><p>        /// &lt;/param&gt;</p><p>        this.get_events().removeHandler(&quot;resizebegin&quot;, handler);</p><p>    },</p><p>    raiseResizeBegin : function() {</p><p>        /// &lt;summary&gt;</p><p>        /// Raise the resizebegin event</p><p>        /// &lt;/summary&gt;</p><p>        var onresizebeginHandler = this.get_events().getHandler(&quot;resizebegin&quot;);</p><p>        if (onresizebeginHandler) {</p><p>            onresizebeginHandler(this, Sys.EventArgs.Empty);</p><p>        }</p><p>    },</p><p></p><p>    get_resizebegin : function() {</p><p>        /// &lt;value type=&quot;Object&quot;&gt;</p><p>        /// Function to invoke on resizebegin (can be a Function, name of a Function, or expression that evaluates to a Function)</p><p>        /// &lt;/value&gt;</p><p>        return this.get_events().getHandler(&quot;resizebegin&quot;);</p><p>    },</p><p>    set_resizebegin : function(value) {</p><p>        if (value &amp;&amp; (0 &lt; value.length)) {</p><p>            var func = CommonToolkitScripts.resolveFunction(value);</p><p>            if (func) { </p><p>                this.add_resizebegin(func);</p><p>            } else {</p><p>                throw Error.argumentType(&#39;value&#39;, typeof(value), &#39;Function&#39;, &#39;resizebegin handler not a function, function name, or function text.&#39;);</p><p>            }</p><p>        }</p><p>    },</p><p></p><p>    get_Size : function() {</p><p>        /// &lt;value type=&quot;Object&quot;&gt;</p><p>        /// Size of the target (of the form {width, height})</p><p>        /// &lt;/value&gt;</p><p>        return { width: this._measurementToNumber(CommonToolkitScripts.getCurrentStyle(this._lining, &#39;width&#39;)),</p><p>            height: this._measurementToNumber(CommonToolkitScripts.getCurrentStyle(this._lining, &#39;height&#39;))};</p><p>    },</p><p>    set_Size : function(value) {</p><p>        var deltaX = value.width-this._measurementToNumber(CommonToolkitScripts.getCurrentStyle(this._lining, &#39;width&#39;));</p><p>        var deltaY = value.height-this._measurementToNumber(CommonToolkitScripts.getCurrentStyle(this._lining, &#39;height&#39;));</p><p>        this._resizeControl(0, 0, deltaX, deltaY);</p><p>        this._rememberSize();</p><p>        this.raisePropertyChanged(&#39;Size&#39;);</p><p>    }</p><p>}</p><p>AjaxControlToolkit.ResizableControlBehavior.registerClass(&#39;AjaxControlToolkit.ResizableControlBehavior&#39;, AjaxControlToolkit.BehaviorBase);</p><p>//    getDescriptor : function() {</p><p>//        var td = AjaxControlToolkit.ResizableControlBehavior.callBaseMethod(this, &#39;getDescriptor&#39;);</p><p>//        td.addProperty(&#39;HandleCssClass&#39;, String);</p><p>//        td.addProperty(&#39;ResizableCssClass&#39;, String);</p><p>//        td.addProperty(&#39;HandleOffsetX&#39;, Number);</p><p>//        td.addProperty(&#39;HandleOffsetY&#39;, Number);</p><p>//        td.addProperty(&#39;MinimumWidth&#39;, Number);</p><p>//        td.addProperty(&#39;MinimumHeight&#39;, Number);</p><p>//        td.addProperty(&#39;MaximumWidth&#39;, Number);</p><p>//        td.addProperty(&#39;MaximumHeight&#39;, Number);</p><p>//        td.addProperty(&#39;Size&#39;, Object);</p><p>//        td.addEvent(&#39;onresize&#39;);</p><p>//        td.addEvent(&#39;onresizing&#39;);</p><p>//        return td;</p><p>//    },</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/smcherniss.jpg?forceidenticon=false&amp;dt=635047210800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>