XAML Là Gì? - The Complete WPF Tutorial

WPF Tutorial TOC Table of Contents

Download as PDF

PDF Download this entire tutorial as PDF, plus all the code samples, right now!

Chapter/article TOC

  1. XAML là gì?
  2. XAML cơ bản
  3. Events (sự kiện) trong XAML

About WPF

  • WPF là gì?
  • WPF vs. WinForms

Bắt đầu

  • Cài đặt Visual Studio Community
  • Hello, WPF!

XAML

  • XAML là gì?
  • XAML cơ bản
  • Events (sự kiện) trong XAML

Một ứng dụng WPF

  • Giới thiệu về 1 WPF Application
  • The Window
  • Làm việc với App.xaml
  • Tham số Command-line trong WPF
  • Resources
  • Bắt lỗi trong WPF
  • Application Culture / UICulture

Các control cơ bản

  • TextBlock control
  • TextBlock control - Định dạng nội tuyến
  • Label
  • TextBox control
  • Button control
  • CheckBox control
  • RadioButton control
  • PasswordBox control
  • The Image control

Control concepts

  • Chú giải control
  • Trang trí Text trong WPF
  • Thứ tự tab
  • Access Keys (Khóa truy cập)

Panels

  • Mở đầu cho chương WPF panels
  • Control Canvas
  • The WrapPanel control
  • StackPanel
  • Dockpanel
  • Control Grid
  • The Grid - Rows & columns
  • The Grid - Units
  • The Grid - Kéo dài một control sang một ô khác (Span)
  • GridSplitter
  • Ứng dụng grid: Tạo 1 biểu mẩu

UserControls & CustomControls

  • Introduction
  • Tạo và sử dụng một UserControl

Data binding

  • Bắt đầu phần WPF data binding
  • Mở đầu về sự ràng buộc quan hệ dữ liệu trong data binding
  • Sử dụng DataContext
  • Data binding thông qua Code-behind
  • Phương thức UpdateSourceTrigger
  • Đáp ứng các thay đổi trong data binding
  • Chuyển đổi giá trị với IValueConverter
  • Thuộc tính StringFormat
  • Debugging data bindings

Các lệnh Commands

  • Giới thiệu về các lệnh WPF
  • Sử dụng WPF commands
  • Thực hiện một WPF Command tùy chỉnh

Hộp thoại

  • The MessageBox
  • Hộp thoại mở file - OpenFileDialog
  • SaveFileDialog
  • The other dialogs
  • Tạo hộp thoại nhập tùy chỉnh

Điều khiển giao diện chung

  • Điều khiển Menu WPF
  • ContextMenu trong WPF
  • Điều khiển WPF ToolBar
  • The WPF StatusBar control
  • Thanh Ribbon

Các điều khiển Rich Text

  • Tổng quan về các điều khiển WPF Rich Text
  • Control FlowDocumentScrollViewer
  • Điều khiển FlowDocumentPageViewer
  • Điều khiển FlowDocumentReader
  • Creating a FlowDocument from Code-behind
  • Advanced FlowDocument content
  • Điều khiển RichTextBox
  • How-to: Tạo một trình biên tập Rich Text

Các điều khiển dạng khác

  • The Border control
  • The Slider control
  • The ProgressBar control
  • The WebBrowser control
  • The WindowsFormsHost control
  • The GroupBox control
  • Điều khiển Lịch
  • Điều khiển DatePicker
  • The Expander control

TabContol

  • Sử dụng WPF TabControl
  • WPF TabControl: Tab positions
  • WPF TabControl: Tạo kiểu cho TabItems

Danh sách control

  • ItemsControl
  • ListBox control
  • Điều khiển ComboBox

ListView

  • Giới thiệu về ListView
  • Một ví dụ ListView đơn giản
  • ListView, data binding and ItemTemplate
  • ListView with a GridView
  • Làm sao để: ListView hiển thị với tên cột được căn trái
  • Phân nhóm trong ListView
  • Sắp xếp trong ListView
  • Làm sao để: sắp xếp cột với ListView
  • ListView filtering

TreeView control

  • Giới thiệu về TreeView
  • Một ví dụ TreeView đơn giản
  • TreeView, data binding and multiple templates
  • TreeView - Selection/Expansion state
  • Lazy loading TreeView items

DataGrid control

  • DataGrid control
  • DataGrid columns
  • DataGrid with row details

Styles

  • Giới thiệu về WPF styles
  • Sử dụng WPF styles
  • Trigger, DataTrigger & EventTrigger
  • WPF MultiTrigger và MultiDataTrigger
  • Trigger animations

Audio & Video

  • Phát âm thanh
  • Phát video
  • Cách thực hiện: Tạo trình phát Audio / Video hoàn chỉnh
  • Tổng hợp giọng nói (làm cho WPF nói)
  • Nhận dạng giọng nói (làm cho WPF lắng nghe)

Misc.

  • DispatcherTimer
  • Đa luồng với BackgroundWorker
  • Hủy bỏ BackgroundWorker

Tạo trò chơi: SnakeWPF

  • Giới thiệu
  • Tạo khu vực trò chơi
  • Tạo và di chuyển con rắn
  • Chuyển động liên tục với DispatcherTimer
  • Thêm thức ăn cho rắn
  • Điều khiển Rắn
  • Phát hiện va chạm
  • Cải thiện SnakeWPF: Làm cho nó trông giống một trò chơi hơn
  • Cải thiện SnakeWPF: Thêm danh sách high score
  • Cải thiện SnakeWPF: Thêm âm thanh
  • Trò chơi hoàn chỉnh & Lời kết
  • WPF
  • ASP.NET MVC
  • ASP.NET WebForms
  • C#
  • CSS3
  • HTML5
  • JavaScript
  • jQuery
  • PHP5

This article has been localized into Vietnamese by the community.

If you are fluent in Vietnamese, then please help us - just point to any untranslated element (highlighted with a yellow left border - remember that images should have their titles translated as well!) inside the article and click the translation button to get started. Or have a look at the current translation status for the Vietnamese language.

If you see a translation that you think looks wrong, then please consult the original article to make sure and then use the vote button to let us know about it.

Metadata

Please help us by translating the following metadata for the article/chapter, if they are not already translated.

If you are not satisfied with the translation of a specific metadata item, you may vote it down - when it reaches a certain negative threshold, it will be removed. Please only submit an altered translation of a metadata item if you have good reasons to do so!

Please login to translate metadata! Already logged in? Please try reloading the page!
  • More info...
  • Looking for the original article in English?
XAML: XAML là gì?

XAML, là viết tắt của từ eXtensible Application Markup Language, là biến thể của Microsoft dựa trên XML nhằm mô tả một GUI. Trong những GUI framework trước, như Winforms, một GUI được tạo bằng cùng một ngôn ngữ mà ngôn ngữ đó bạn sẽ sử dụng để tương tác với GUI, ví dụ C# hoặc VB.NET và thường được duy trì bởi nhà thiết kế (Ví dụ: VisualStudio), nhưng với XAML, Microsoft đang đi theo một cách khác. Giống như HTML, bạn có thể dễ dàng viết và chỉnh sửa GUI của mình.

Đây không thực sự là một hướng dẫn chi tiết về XAML, mà tôi sẽ trình bày một cách ngắn gọn cho bạn thấy cách dùng XAML như thế nào, bởi vì nó là một phần thiết yếu của WPF. Khi bạn tạo một Window hoặc một Page, nó sẽ bao gồm một tệp XAML và một tệp CodeBehind, chúng sẽ cùng cấu thành nên một Window/Page. Tệp XAML mô tả interface với tất cả các element, trong khi tệp CodeBehind xử lý tất cả các Event(sự kiện) và có quyền truy cập để điều khiển sự hoạt động của XAML

Trong chương tiếp theo, chúng ta sẽ xem xét cách làm việc của XAML như thế nào và làm sao để bạn sử dụng nó để tạo một interface cho riêng bạn.

Hello, WPF! Previous Basic XAML Next This article has been fully translated into the following languages:
  • Afrikaans
  • Albanian
  • Arabic
  • Armenian
  • Bangla
  • Bulgarian
  • Catalan
  • Chinese
  • Croatian
  • Czech
  • Danish
  • Dutch
  • Finnish
  • French
  • Galician
  • German
  • Greek
  • Hebrew
  • Hindi
  • Hungarian
  • Indonesian
  • Italian
  • Japanese
  • Korean
  • Lao
  • Lithuanian
  • Norwegian Bokmål
  • Persian
  • Polish
  • Portuguese
  • Punjabi
  • Romanian
  • Russian
  • Serbian
  • Slovak
  • Slovenian
  • Spanish
  • Swedish
  • Tamil
  • Thai
  • Turkish
  • Ukrainian
  • Urdu
  • Uzbek
  • Vietnamese
Is your preferred language not on the list? Click here to help us translate this article into your language!

Từ khóa » Học Xaml