Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Pro WPF in C# 2010 phần 2
Đang chuẩn bị liên kết để tải về tài liệu:
Pro WPF in C# 2010 phần 2
Thụy Du
58
105
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Quả thật rất là khó khăn cho những ai mới bắt đầu. Nhưng nếu như mới bắt đầu bạn đi đúng hướng thì sẽ ít gặp những trường hợp trên hơn, giúp bạn tiếp cận và học WPF nhanh hơn. Với bài viết này. Tôi sẽ chia sẽ về kinh nghiệm học WPF của mình để bạn có cái nhìn đúng đắn hơn về WPF, WPF thực sự không khó như bạn nghĩ! | CHAPTER 2 XAML For example consider this markup Window xmlns http schemas.microsoft.com winfx 2006 xaml presentation xmlns x http schemas.microsoft.com winfx 2006 xaml StackPanel Button Click cmd_Click Button StackPanel Window If you pass this document to the XamlReader.Load method an error will occur because there is no Window.cmd_Click method. But if you derive your own custom class from Window say Xaml2009Window and you use markup like this local Xaml2009Window xmlns http schemas.microsoft.com winfx 2006 xaml presentation xmlns x http schemas.microsoft.com winfx 2006 xaml xmlns local clr-namespace NonCompiledXaml assembly NonCompiledXaml StackPanel Button Click cmd_Click Button StackPanel local Xaml2009Window the parser will be able to create an instance of Xaml2009Window class and will then attach the Button.Click event to the Xaml2009Window.cmd_Click method automatically. This technique works perfectly well with private methods but if the method doesn t exist or if it doesn t have the right signature an exception will occur. Rather than loading the XAML in its constructor as in the previous example the Xaml2009Window class uses its own static method named LoadWindowFromXaml . This design is slightly preferred because it emphasizes that a nontrivial process is required to create the window object in this case opening a file. This design also allows for clearer exception handling if the code can t find or access the XAML file. That s because it makes more sense for a method to throw an exception than for a constructor to throw one. Here s the complete window code public class Xaml2009Window Window public static Xaml2009Window LoadWindowFromXaml string xamlFile . . . . Get the XAML content from an external file. using FileStream fs new FileStream xamlFile FileMode.Open Xaml2009Window window Xaml2009Window XamlReader.Load fs return window private void cmd_Click object sender RoutedEventArgs e MessageBox.Show You clicked. . 57 CHAPTER 2 XAML You can create an .
TÀI LIỆU LIÊN QUAN
Pro WPF in C# 2010
Pro WPF in C# 2010: Windows Presentation Foundation in .NET 4.0
Pro WPF in C# 2010 phần 1
Pro WPF in C# 2010 phần 2
Pro WPF in C# 2010 phần 3
Pro WPF in C# 2010 phần 4
Pro WPF in C# 2010 phần 5
Pro WPF in C# 2010 phần 6
Pro WPF in C# 2010 phần 7
Pro WPF in C# 2010 phần 8
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.