Home / Community & Support / Knowledge Base / RadControls for ASP.NET and ASP.NET AJAX / Dock / Making RadDock transparent when dragging it around the screen

Making RadDock transparent when dragging it around the screen

Article Info

Rating: 3

Article information

Article relates to

 Telerik.Web.UI 2007.13.14+

Created by

 Sophy, Telerik

Last modified

 March 27, 2008

Last modified by

 Sophy, Telerik


PROBLEM

How to make RadDock transparent when dragging it around the screen?

SOLUTION

The idea is to handle OnClientDragStart to set transparency and then OnClientDragEnd to return to the original non-transparent dock.

<telerik:raddock top="200" left="200" id="RadDock1" runat="server"      
    text="RadDock1" title="RadDock1" onclientdragstart="OnClientDragStart"      
    onclientdragend="OnClientDragEnd">       
</telerik:raddock>       
some text       
<script type="text/javascript">       
function OnClientDragStart(sender, args)       
{       
    var dockElement = sender.get_element();         
    dockElement.style.opacity = "0.7";         
    dockElement.style.mozOpacity = "0.7";        
    dockElement.style.filter = "alpha(opacity=70)";        
}       
       
function OnClientDragEnd(sender, args)       
{       
    var dockElement = sender.get_element();         
    dockElement.style.opacity = "";         
    dockElement.style.mozOpacity = "";       
    dockElement.style.filter = "";       
}       
</script>     
 

Comments

If you'd like to comment on this KB article, please, send us a Support Ticket.
Thank you!

Please Sign In to rate this article.