tailieunhanh - Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition phần 9

Vì vậy, nếu chúng ta đi trên con đường dài, chúng tôi có thể thực hiện Cấu hình Adapter dữ liệu Sử dụng và loại CompareValidator tiếp giáp với từng lĩnh vực tương ứng. Cuối cùng, thêm một nút duy nhất và Label cuối cùng Bây giờ bạn có một giao diện người dùng, chúng ta hãy đi bộ qua quá trình cấu hình từng thành viên. | Simpo PDF Merge and Split Unregistered Version - http 1092 CHAPTER 29 PROGRAMMING WITH WPF CONTROLS Figure 29-23. Grid types containing splitters Source Code The file can be found under the Chapter 29 subdirectory. Positioning Content Within DockPanel Panels DockPanel is typically used as a master panel that contains any number of additional panels for grouping of related content. DockPanels make use of attached property syntax as seen with the Canvas type to control where their upper-left corner the default will attach itself within the panel. Here is a very simple DockPanel definition which results in the output shown in Figure 29-24 DockPanel LastChildFill True -- Dock items to the panel -- Label Top Name lblInstruction FontSize 15 Enter Car Information Label Label Left Name lblMake Make Label Label Right Name lblColor Color Label Label Bottom Name lblPetName Pet Name Label Button Name btnOK OK Button DockPanel Figure 29-24. A simple DockPanel Note If you add multiple elements to the same side of a DockPanel they will be stacked along the specified edge in the order that they are declared. The benefit of using DockPanel types is that as the user resizes the window each element remains connected to the specified side of the panel via . Also notice that the opening DockPanel element sets the LastChildFill attribute to true. Given that the Button type has not specified any value it will therefore be stretched within the remaining space. Simpo PDF Merge and Split Unregistered Version - http CHAPTER 29 PROGRAMMING WITH WPF CONTROLS 1093 Source Code The file can be found under the Chapter 29 subdirectory. Enabling Scrolling for Panel Types It is worth pointing out the WPF supplies a ScrollViewer type which provides automatic scrolling behaviors for nested panel types ScrollViewer StackPanel Button .

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