intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Bài giảng Công nghệ lập trình tiên tiến: Chương 4 - ĐH Công nghệ Đồng Nai

Chia sẻ: Na Na | Ngày: | Loại File: PPTX | Số trang:164

90
lượt xem
9
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Bài giảng Công nghệ lập trình tiên tiến: Chương 4 trình bày các nội dung về thiết kế giao diện về WPF như đặc điểm, công dụng, cách thức thực hiện, cú pháp, câu lệnh và các nội dung khác.

Chủ đề:
Lưu

Nội dung Text: Bài giảng Công nghệ lập trình tiên tiến: Chương 4 - ĐH Công nghệ Đồng Nai

  1. DONG NAI UNIVERSITY OF TECHNOLOGY What's New in WPF Version 4.5? 1
  2. DONG NAI UNIVERSITY OF TECHNOLOGY 1 Windows Presentation Foundation 2 Benefits 3 Tools 4 Discussion of WPF applicability 2
  3. DONG NAI UNIVERSITY OF TECHNOLOGY What is WPF? WPF is a new API for building Windows applications The goal of Windows Presentation Foundation (WPF) is to provide these advances for Windows. Included in version 4.0 of the Microsoft .NET Framework, WPF allows building interfaces that incorporate documents, media, two- and three-dimensional graphics, animations, Web-like characteristics, and much more. 3
  4. DONG NAI UNIVERSITY OF TECHNOLOGY What Windows Presentation Foundation Provides? Three most important: Ø a unified platform for modern user interfaces Ø the ability for developers and designers to work together, Ø and a common technology for Windows and Web browser user interfaces. 4
  5. DONG NAI UNIVERSITY OF TECHNOLOGY What is WPF good for? Ø To enable designers and developers to work together Ø To allow an easy way to customize the look of controls without changing its behavior Ø To allow 3D graphics more easily in Windows applications Ø To allow an easy way to do animations in Windows applications Ø To enable the creation of applications which scale nicely to high resolution screens 5
  6. DONG NAI UNIVERSITY OF TECHNOLOGY Which of these UI have you worked with? Ø GDI (20 years), GDI+, WinForms Ø DirectX (11 years), Direct3D Ø Quartz, DirectShow (8 years) – Problems: • Showing their age • Each API is different • Mixing APIs is challenging 6
  7. DONG NAI UNIVERSITY OF TECHNOLOGY Next Gen Ø WPF – replaces GDI Ø Direct3D – large games, used by WPF Ø Media Foundation – ultimately will replace DirectShow Ø MCML –markup language for Media Center Edition applications Ø XNA – small games 7
  8. DONG NAI UNIVERSITY OF TECHNOLOGY WPF Ø Declarative programming with XAML markup Ø For Designers and Developers Ø Rewritten from scratch – Built on top of Direct3D – Hardware accelerated – Vector based – Resolution independent (1/96 inch) – Retained graphics 8
  9. DONG NAI UNIVERSITY OF TECHNOLOGY Overview of WPF Architecture Ø Most of WPF is written in managed code Ø milcore is the only unmanaged component of WPF 9
  10. DONG NAI UNIVERSITY OF TECHNOLOGY Managed Code: Code write in .net framework environment is call Managed code, they will be executed direct from CLR(Common Language Runtime). CLR will manage memory, security problem, debugging…and other useful features 10
  11. DONG NAI UNIVERSITY OF TECHNOLOGY Unmanaged Code Not in .net framework, that is not controlled by CLR, Unmanaged Code will bee execute with 2 wrapper class support: CCW (COM Callable Wrapper) and RCW (Runtime Callable Wrapper). 11
  12. DONG NAI UNIVERSITY OF TECHNOLOGY CCW (COM Callable Wrapper) 12
  13. DONG NAI UNIVERSITY OF TECHNOLOGY RCW (Runtime Callable Wrapper) 13
  14. DONG NAI UNIVERSITY OF TECHNOLOGY XAML: Extensible Application Markup Language Ø Declarative object instantiation Ø Not exclusive to WPF Ø Separates UI and logic – Common language for Designers and Developers • Demo: Blend and VS – Parallel development – Localization, Branding – Targeted UI (devices, users, …) Ø Tool support Ø Supports C# and VB.NET 14
  15. DONG NAI UNIVERSITY OF TECHNOLOGY Benefits Ø Markup/code-behind model (like ASP.NET) Ø Excellent layout options and text flow features Ø Access to powerful graphics hardware Ø Certain otherwise-impossible effects are made easy (skewing and rotating textboxes, etc.) 15
  16. DONG NAI UNIVERSITY OF TECHNOLOGY Tools • Cider • XAML Pad • 3D tools such as Light wave can generate XAML. – Electric Rain Zam 3D – Mobiform Aurora – Cinema 4D • Microsoft Expression – Graphics Designer – Interactive Designer 16
  17. DONG NAI UNIVERSITY OF TECHNOLOGY Comparisons: WPF vs. DirectX and GDI+ 17
  18. DONG NAI UNIVERSITY OF TECHNOLOGY WPF Build Pipeline 18
  19. DONG NAI UNIVERSITY OF TECHNOLOGY Basic topics in WPF Ø WPF code and XAML Ø Property & object in XAML: syntax Ø Layout Ø Basic control Ø Basic property Ø WPF Concepts 19
  20. DONG NAI UNIVERSITY OF TECHNOLOGY 1. WPF code and XAML: first app Ø WPF code – New consoles project (or Windows Apps) – Reference: PresentationCore, PresentationFramework, and WindowsBase How to create this window? 20
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
3=>0