TAILIEUCHUNG - Illustrated WPF phần 2

Thuộc tính quan trọng của một cửa sổ Khi bạn nhìn vào một cửa sổ trên màn hình, bạn sẽ thấy nhiều điều. Chúng bao gồm các khu vực khách hàng, trong đó bao gồm nội dung và bối cảnh của nó, và khu vực nonclient, trong đó bao gồm biên giới cửa sổ và thanh cửa sổ ở phía trên. Sự xuất hiện của các mặt hàng này được điều khiển bởi năm đặc tính: Tiêu đề, nội dung, | CHAPTER 2 OVERVIEW OF WPF PROGRAMMING This code produces the window shown in Figure 2-13. Figure 2-13. The resulting window 32 CHAPTER 2 OVERVIEW OF WPF PROGRAMMING Important Properties of a Window When you look at a window on the screen you ll see several things. These include the client area which consists of its content and background and the nonclient area which consists of the window border and the window bar at the top. The appearance of these items is controlled by five properties Title Content Foreground Background and Windowstyle. The Window object is illustrated in Figure 2-14. Figure 2-14. A few of the many important properties of the Window class 33 CHAPTER 2 OVERVIEW OF WPF PROGRAMMING WindowStyle The Windowstyle property gets or sets the characteristics of the nonclient area including the border style and the buttons shown in the window bar. The values that the Windowstyle property can accept are the following SingleBorderWindow This is the default style. It has the following - A plain single border around the client area - A minimize maximize and close button in the window bar - An application icon in the window bar ThreeDBorderWindow This is similar to the SingleBorderWindow value but the inside of the border is beveled. ToolWindow This is like the SingleBorderWindow value but doesn t have the icon or the minimize or maximize buttons in the window bar. Also the border is thinner. None This style has a thin border and no window bar. The following code produces the top-left window shown in Figure 2-15. You can produce the other three windows by changing the Windowstyle property. STAThread static void Main . Window win new Window 75 300 WindowStyles Windowstyle 1 Set property Application app new Application win Figure 2-15. Examples of the four different values of the WindowStyle property .

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.