TAILIEUCHUNG - Foundation Silverlight 3 Animation- P6

Foundation Silverlight 3 Animation- P6: Silverlight has really come a long way since I started using it. It’s kind of interesting to look back a mere two years (roughly) and think about how the workflow has changed. Of even more interest is the staggering speed at which new features are being added. In the time I’ve been using Silverlight, it has grown from a somewhat limited toolset to an ever-more-impressive technology that has really started to come into its own. | ANIMATION TECHNIQUES 12. Selecting a control from the Asset Library will add an icon to the toolbox that you can use to add the control to your project. Select the RectangleControl object from the asset list. Once the icon shows up in the toolbox double-click it. A new 200X200 blue rectangle will be added to the artboard. This turns into a lot of fun when the controls are added programmatically because each instance of a control exists in its own space and can have its own color size and so on. 13. On the Project tab right-click and select Edit in Visual Studio from the pop-up menu. In Visual Studio we ll add an instance of this custom control in the same place as variables just above the MainPage constructor. Each instance that we create is a copy of the original object but each copy has its own set of unique properties. Once an object instance has been declared it is available for use in the application. To make it visible within the application it must be added to the LayoutRoot Canvas. This is done by calling the Add method for . 14. Just above the MainPage constructor add the following code to declare an instance of the Rectangle object RectangleControl MyRect new RectangleControl 15. To add the user control to the LayoutRoot Canvas add the following code inside the MainPage constructor just after the InitializeComponent line MyRect Now the rectangle will be displayed on the canvas when the project runs. 16. A second instance is equally simple to add create an object called GreenRect and add it to the canvas. 17. This time we ll add a little code to modify the object a bit. Because we named the elements that make up the user control they are easy to access from code by referencing the object name and then the member name. In the case of GreenRect we want to place the rectangle at 400 200. To do this add some code before the rectangle is added to the canvas

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.