TAILIEUCHUNG - ASP.NET 4 Unleased - p 168

Việc kiểm soát SmartImage mất lợi thế của một trình duyệt Internet Explorer lọc được đặt tên là BasicImage lọc. Bộ lọc này cho phép bạn thao tác hình ảnh bằng cách xoay, phản chiếu, và thay đổi độ mờ của hình ảnh. Trong Ví dụ 36,36, các bộ lọc được áp dụng trong AddAttributesToRender () phương pháp. Việc kiểm soát SmartImage được liên kết với một ControlDesigner đặt tên là SmartImageDesigner thông qua các thuộc tính của thiết kế điều khiển | 1644 CHAPTER 36 Building Custom Controls return true The Smartimage control takes advantage of an Internet Explorer filter named the Basicimage filter. This filter enables you to manipulate images by rotating mirroring and changing the opacity of images. In Listing the filter is applied in the AddAttributesToRender method. The Smartimage control is associated with a ControlDesigner named the SmartimageDesigner through the control s Designer attribute. The SmartimageDesigner class overrides the base class s ActionLists property to expose a custom DesignerActionList. The DesignerActionList is the final class declared in Listing . This class contains four methods named Rotate DoRotate Mirror and DoMirror . The GetSortedActionitems method exposes the Rotate and Mirror actions. When all is said and done the custom ActionList enables you to display Rotate and Mirror Smart Tags for the Smartimage control in Design view. When you open a page in the browser after clicking the Rotate action in Design view the image is rotated see Figure . FIGURE Adding Smart Tags to a control. NOTE You can view the Smartimage control by opening the page included in the downloadable code on the website that accompanies this book. From the Library of Wow eBook Summary 1645 Summary In this chapter you learned how to build basic controls in Framework. First you learned how to create both fully rendered and composite controls. You also learned how to combine the features of fully rendered and composite controls by creating hybrid controls. You learned how to preserve the values of control properties in View State. You learned the difference between View State and Control State and how to use both features of the framework. Next you learned how to handle postback data and events. You saw how you can process form data submitted to the server. You also learned how you can raise a server-side event that is initiated by a postback. This chapter .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.