using System;
using System.Data;
using
System.Drawing;using
System.Web;using
System.Collections;using
System.Web.UI;using
System.Web.UI.WebControls;using
System.ComponentModel;using
System.Windows.Forms;namespace LW.WebDragDropListBox.Control{
public partial class WebDragDropListBox : System.Web.UI.WebControls.ListBox{
//[ToolboxData("<{0}:WebDragDropListBox runat=server></{0}:WebDragDropListBox>")]public delegate void WebDragOverListBoxHandler(object sender, DragEventArgs e); public event WebDragOverListBoxHandler WebDragOverListBox;public delegate void WebDropListBoxHandler(object sender, DragEventArgs e); public event WebDropListBoxHandler WebDropListBox;public delegate void WebDragEnterListBoxHandler(object sender, DragEventArgs e); public event WebDragEnterListBoxHandler WebDragEnterListBox;public WebDragDropListBox(){
}
#region Properties // PROPERTY:: AllowDrop[Category("Behavior")][
Description("Indicates whether the control can accept data that the user drags onto it.")][DefaultValue(false)]public bool AllowDrop{
get{
object o = ViewState["AllowDrop"]; if (o == null)return false;return (bool)o;}
set { ViewState["AllowDrop"] = value; }}
#endregion
#region
Members#endregion
#region Event Handlingprotected virtual void OnWebDragOverListBox(DragEventArgs e)
{
if (WebDragOverListBox != null)WebDragOverListBox(this, e);}
protected virtual void OnWebDropListBox(DragEventArgs e){
if (WebDropListBox != null)WebDropListBox(this, e);}
protected void WebDragOverListBox_DragOver(object sender, DragEventArgs e){
OnWebDragOverListBox(e);
}
protected void WebDropListBox_Drop(object sender, DragEventArgs e){
OnWebDropListBox(e);
}
#endregion
}
}
댓글 영역