TAILIEUCHUNG - Illustrated WPF phần 4

Tôi đã đề cập điều này sớm hơn một chút khi mô tả phần nội dung của các cú pháp phần tử. Điều này sở hữu nội dung mặc định được quy định cụ thể bằng cách sử dụng thuộc tính ContentPropertyAttribute trong khai báo lớp. (Đây là một thuộc tính NET, không phải là một thuộc tính XAML.) | CHAPTER 5 LAYOUT The UniformGrid The UniformGrid is an extremely simple and limited version of a grid. The following are some of the important things to know about the UniformGrid All the cells of a UniformGrid are always the same size as all the other cells regardless of whether the UniformGrid changes size or shape. Each cell contains a single element. Elements are added to the cells in the order in which they are listed in listing. You create the cells by specifying the number of rows and columns in the UniformGrid element. The following code creates a UniformGrid with two rows and two columns. It then populates each cell with a button. Set the Row Count Set the Column Count ị UniformGrid Rows 2 Columns 2 Button Button 1 Button Button Button 2 Button Button Button 3 Button Button Button 4 Button UniformGrid This markup produces the UniformGrid shown in Figure 5-34. E UniformGrid I ạ II El II 3 I Button 1 Button 2 Button 3 Button 4 Figure 5-34. All the cells is a UniformGrid are always the same size as all the other cells regardless of how the size or shape ofthe UniformGrid changes. 138 CHAPTER 5 LAYOUT Summary In this chapter you saw how to use the major layout panels and learned their characteristics The StackPanel stacks its elements vertically or horizontally. The WrapPanel places its elements in rows or columns and wraps to a new row or column when the line reaches the end of the panel. The DockPanel allows its elements to select a side on which to adhere. The Grid comprises cells formed from rows and columns. This is the most powerful of the panels we covered. The Canvas allows you to associate elements with one of its corners. The UniformGrid produces a simple grid with cells that are all the same size. .

TỪ KHÓA LIÊN QUAN
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.