tailieunhanh - Manning ASP.NET AJAX in Action PHẦN 9

cung cấp các tài liệu tham khảo kịch bản và mô tả kịch bản cần thiết để dây một thành phần khách hàng để kiểm soát mở rộng. mà không phải là bao gồm trong danh sách sau đây. (Bạn có thể truy cập và chạy toàn bộ mã nguồn cho ví dụ này sau khi tải về nó từ / Gallo.) Liệt kê 13,22 cho thấy HTML tĩnh để thêm vào trang . | The drag-and-drop engine 423 Listing Code for the CartZone class which represents a drop zone Samples function element this element initialize function this initialize this dispose function this this dispose _ As anticipated the registerDropTarget method is called in the initialize method where you perform the control s initial setup. Its counterpart is the unregisterDropTarget method which is used to remove the control from the list of drop targets held by the DragDropManager. It s usually invoked in the dispose method where the cleanup of the current instance is performed. To receive feedback from the DragDropManager a drop target must implement the IDropTarget interface. Following the same approach we took with the BookItem control we ll first introduce the interface and then implement it in the CartZone control. The IDropTarget interface The interface is implemented by drop targets to receive feedback from the DragDropManager. By implementing this interface a drop target can determine whether a draggable item can be dropped over its area. You can also take actions based on the position of the draggable item with respect to the drop zone. Table lists the methods defined by the IDropTarget interface along with their descriptions. The get_dropTargetElement method returns the DOM element that acts as the drop zone. Usually this is the associated element of the client component that represents the drop target. When an element is being dragged the DragDropManager calls this method on every registered drop targets. Then it performs 424 CHAPTER 12 Dragging and dropping Table Methods defined in the .

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.