|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
IntroductionThis is a control that will help you to make pages that can be customized by the users. The control exhibits similar properties like My MSN Drag n Drop. BackgroundI have seen many people posting their queries for the drag and drop feature like My MSN. Some of them have also posted that Microsoft is doing some thing with .armx extension. I don't know what Microsoft is doing. But here I have overridden the This control is very easy to use. The control exposes some Using the codeI have just overridden the
<%@ Register TagPrefix="cc1" Namespace="Drag" Assembly="Panel" %>
<cc1:NewPanel Draggable=true id="NewPanel1" style="position:absolute;
width:155px; height:115px; z-index:1;" runat="server"
cssClass="drag" align=center>
</cc1:NewPanel >
The above example is very simple. To get a look like My MSN, I have added a If this is not done then the user can drag the strRender.Append("if (event.srcElement.parentElement" +
".parentElement.parentElement.parentElement.tagName==\"DIV\"){");
The first <%@ Register TagPrefix="cc1" Namespace="Drag" Assembly="Panel" %>
<cc1:NewPanel Draggable=true id="NewPanel1"
style="position:absolute; width:155px; height:115px; z-index:1;"
runat="server" cssClass="drag" align=center>
<table cellspacing=0 cellpadding=0 border=0 width=100% height=100%>
<tr class="ss" height=22>
<td class="mod_tlc" width=6> </td><td class="modhead"
width=100%><asp:Label text="My Inbox"
cssClass="tan-bold" runat="server/"></td><td class="mod_trc"
width=6> </td>
</tr>
<tr>
<td colspan=3>
<table cellspacing=0 cellpadding=0 width=100% height=100%
class="tables"><tr><td>Your content goes here</td></tr>
</table>
</td>
</tr>
</table>
</cc1:NewPanel >
In order to remember the position of each I have set the The table structure is as follows:
It is possible to set the X and Y coordinates for the this.Style.Add("Top",myReader["y"].ToString());
this.Style.Add("Left",myReader["x"].ToString());
I have attached the Style.css which I got from My MSN website. You can add anything to this I have hard coded the public bool Draggable
{
get
{
return _draggable;
}
set
{
_draggable = true;
}
}
Steps to use the control
Users can also include a
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||