C# Класс Ext.Net.DragDrop

Показать файл Открыть проект

Private Properties

Свойство Тип Описание
ToScript string

Открытые методы

Метод Описание
AddInvalidHandleClass ( string cssClass ) : void

Lets you specify a css class of elements that will not initiate a drag

AddInvalidHandleId ( string id ) : void

Lets you to specify an element id for a child of a drag handle that should not initiate a drag

AddInvalidHandleType ( string tagName ) : void

Allows you to specify a tag name that should not start a drag operation when clicked. This is designed to facilitate embedding links within a drag handle that do something other than start the drag.

AddToGroup ( string sGroup ) : void

Add this instance to a group of related drag/drop objects. All instances belong to at least one group, and can belong to as many groups as needed.

ApplyConfig ( ) : void

Applies the configuration parameters that were passed into the constructor. This is supposed to happen at each level through the inheritance chain. So a DDProxy implentation will execute apply config on DDProxy, DD, and DragDrop in order to get all of the parameters that are available in each object.

ClearConstraints ( ) : void

Clears any constraints applied to this instance. Also clears ticks since they can't exist independent of a constraint at this time.

ClearTicks ( ) : void

Clears any tick interval defined for this instance

ConstrainTo ( string constrainTo ) : void

Initializes the drag drop object's constraints to restrict movement to a certain element.

ConstrainTo ( string constrainTo, Paddings pad, bool inContent ) : void

Initializes the drag drop object's constraints to restrict movement to a certain element.

Destroy ( ) : void

Lock ( ) : void

Lock this instance

RemoveFromGroup ( string sGroup ) : void

Remove's this instance from the supplied interaction group

RemoveInvalidHandleClass ( string cssClass ) : void

Unsets an invalid css class

RemoveInvalidHandleId ( string id ) : void

Unsets an invalid handle id

RemoveInvalidHandleType ( string tagName ) : void

Unsets an excluded tag name set by addInvalidHandleType

ResetConstraints ( bool maintainOffset ) : void

resetConstraints must be called if you manually reposition a dd element.

SetDragElId ( string id ) : void

Allows you to specify that an element other than the linked element will be moved with the cursor during a drag

SetHandleElId ( string id ) : void

Allows you to specify a child of the linked element that should be used to initiate the drag operation. An example of this would be if you have a content div with text and links. Clicking anywhere in the content area would normally start the drag operation. Use this method to specify that an element inside of the content div is the element that starts the drag operation.

SetInitPosition ( int diffX, int diffY ) : void

Stores the initial placement of the linked element.

SetOuterHandleElId ( string id ) : void

Allows you to set an element outside of the linked element as a drag handle

SetPadding ( int iTop, int iRight, int iBot, int iLeft ) : void

Configures the padding for the target zone in px. Effectively expands (or reduces) the virtual object size for targeting calculations. Supports css-style shorthand; if only one parameter is passed, all sides will have that padding, and if only two are passed, the top and bottom will have the first param, the left and right the second.

SetXConstraint ( int iLeft, int iRight, int iTickSize ) : void

By default, the element can be dragged any place on the screen. Use this method to limit the horizontal travel of the element. Pass in 0,0 for the parameters if you want to lock the drag to the y axis.

SetYConstraint ( int iUp, int iDown, int iTickSize ) : void

By default, the element can be dragged any place on the screen. Set this to limit the vertical travel of the element. Pass in 0,0 for the parameters if you want to lock the drag to the x axis.

Unlock ( ) : void

Unlock this instace

Unreg ( ) : void

Remove all drag and drop hooks for this element

Приватные методы

Метод Описание
ToScript ( Control owner ) : string

Описание методов

AddInvalidHandleClass() публичный Метод

Lets you specify a css class of elements that will not initiate a drag
public AddInvalidHandleClass ( string cssClass ) : void
cssClass string the class of the elements you wish to ignore
Результат void

AddInvalidHandleId() публичный Метод

Lets you to specify an element id for a child of a drag handle that should not initiate a drag
public AddInvalidHandleId ( string id ) : void
id string the element id of the element you wish to ignore
Результат void

AddInvalidHandleType() публичный Метод

Allows you to specify a tag name that should not start a drag operation when clicked. This is designed to facilitate embedding links within a drag handle that do something other than start the drag.
public AddInvalidHandleType ( string tagName ) : void
tagName string the type of element to exclude
Результат void

AddToGroup() публичный Метод

Add this instance to a group of related drag/drop objects. All instances belong to at least one group, and can belong to as many groups as needed.
public AddToGroup ( string sGroup ) : void
sGroup string the name of the group
Результат void

ApplyConfig() публичный Метод

Applies the configuration parameters that were passed into the constructor. This is supposed to happen at each level through the inheritance chain. So a DDProxy implentation will execute apply config on DDProxy, DD, and DragDrop in order to get all of the parameters that are available in each object.
public ApplyConfig ( ) : void
Результат void

ClearConstraints() публичный Метод

Clears any constraints applied to this instance. Also clears ticks since they can't exist independent of a constraint at this time.
public ClearConstraints ( ) : void
Результат void

ClearTicks() публичный Метод

Clears any tick interval defined for this instance
public ClearTicks ( ) : void
Результат void

ConstrainTo() публичный Метод

Initializes the drag drop object's constraints to restrict movement to a certain element.
public ConstrainTo ( string constrainTo ) : void
constrainTo string The element to constrain to.
Результат void

ConstrainTo() публичный Метод

Initializes the drag drop object's constraints to restrict movement to a certain element.
public ConstrainTo ( string constrainTo, Paddings pad, bool inContent ) : void
constrainTo string The element to constrain to.
pad Paddings Pad provides a way to specify "padding" of the constraints
inContent bool Constrain the draggable in the content box of the element (inside padding and borders)
Результат void

Destroy() публичный Метод

public Destroy ( ) : void
Результат void

Lock() публичный Метод

Lock this instance
public Lock ( ) : void
Результат void

RemoveFromGroup() публичный Метод

Remove's this instance from the supplied interaction group
public RemoveFromGroup ( string sGroup ) : void
sGroup string The group to drop
Результат void

RemoveInvalidHandleClass() публичный Метод

Unsets an invalid css class
public RemoveInvalidHandleClass ( string cssClass ) : void
cssClass string the class of the element(s) you wish to re-enable
Результат void

RemoveInvalidHandleId() публичный Метод

Unsets an invalid handle id
public RemoveInvalidHandleId ( string id ) : void
id string the id of the element to re-enable
Результат void

RemoveInvalidHandleType() публичный Метод

Unsets an excluded tag name set by addInvalidHandleType
public RemoveInvalidHandleType ( string tagName ) : void
tagName string the type of element to unexclude
Результат void

ResetConstraints() публичный Метод

resetConstraints must be called if you manually reposition a dd element.
public ResetConstraints ( bool maintainOffset ) : void
maintainOffset bool
Результат void

SetDragElId() публичный Метод

Allows you to specify that an element other than the linked element will be moved with the cursor during a drag
public SetDragElId ( string id ) : void
id string the id of the element that will be used to initiate the drag
Результат void

SetHandleElId() публичный Метод

Allows you to specify a child of the linked element that should be used to initiate the drag operation. An example of this would be if you have a content div with text and links. Clicking anywhere in the content area would normally start the drag operation. Use this method to specify that an element inside of the content div is the element that starts the drag operation.
public SetHandleElId ( string id ) : void
id string the id of the element that will be used to initiate the drag.
Результат void

SetInitPosition() публичный Метод

Stores the initial placement of the linked element.
public SetInitPosition ( int diffX, int diffY ) : void
diffX int the X offset, default 0
diffY int the Y offset, default 0
Результат void

SetOuterHandleElId() публичный Метод

Allows you to set an element outside of the linked element as a drag handle
public SetOuterHandleElId ( string id ) : void
id string id of the element that will be used to initiate the drag
Результат void

SetPadding() публичный Метод

Configures the padding for the target zone in px. Effectively expands (or reduces) the virtual object size for targeting calculations. Supports css-style shorthand; if only one parameter is passed, all sides will have that padding, and if only two are passed, the top and bottom will have the first param, the left and right the second.
public SetPadding ( int iTop, int iRight, int iBot, int iLeft ) : void
iTop int Top pad
iRight int Right pad
iBot int Bot pad
iLeft int Left pad
Результат void

SetXConstraint() публичный Метод

By default, the element can be dragged any place on the screen. Use this method to limit the horizontal travel of the element. Pass in 0,0 for the parameters if you want to lock the drag to the y axis.
public SetXConstraint ( int iLeft, int iRight, int iTickSize ) : void
iLeft int the number of pixels the element can move to the left
iRight int the number of pixels the element can move to the right
iTickSize int optional parameter for specifying that the element should move iTickSize pixels at a time.
Результат void

SetYConstraint() публичный Метод

By default, the element can be dragged any place on the screen. Set this to limit the vertical travel of the element. Pass in 0,0 for the parameters if you want to lock the drag to the x axis.
public SetYConstraint ( int iUp, int iDown, int iTickSize ) : void
iUp int the number of pixels the element can move up
iDown int the number of pixels the element can move down
iTickSize int optional parameter for specifying that the element should move iTickSize pixels at a time.
Результат void

Unlock() публичный Метод

Unlock this instace
public Unlock ( ) : void
Результат void

Unreg() публичный Метод

Remove all drag and drop hooks for this element
public Unreg ( ) : void
Результат void