XAML,XAML Overview And XAML Syntax

XAML: Extensible Application Markup Language
Extensible Application Markup Language (XAML) is a markup language for declarative application programming. Windows Presentation Foundation (WPF) implements a Extensible Application Markup Language (XAML) loader and provides Extensible Application Markup Language (XAML) language support for Windows Presentation Foundation (WPF) types such that you can create the majority of your application UI in Extensible Application Markup Language (XAML) markup.

In This Section
XAML Overview
XAML Syntax Terminology
Code-Behind and XAML
XAML and Custom Classes
Markup Extensions and XAML
XAML Namespaces and Namespace Mapping
WPF Namescopes
Inline Styles and Templates
Whitespace Processing in XAML
TypeConverters and XAML
XAML Namespace (x:) Language Features
WPF Namespace XAML Extensions
Markup Compatibility (mc:) Language Features
Related Sections
WPF Architecture
Base Elements
Element Tree and Serialization
Input and Commands
Styling and Templating
WPF Fundamentals: Content Models
Threading Model

XAML Overview
This topic describes the features of the Extensible Application Markup Language (XAML) language and demonstrates how you can use XAML to write Windows Presentation Foundation (WPF) applications. This topic specifically describes XAML as implemented by Windows Presentation Foundation (WPF). XAML itself is a larger language concept than Windows Presentation Foundation (WPF).

This topic contains the following sections:
XAML is a Declarative Language With Flow Control Support
XAML Object Elements
Setting Properties
Markup Extensions
Typeconverter-Enabled Attribute Values
Collection Types and XAML Collection Properties
XAML Content Properties
Case and Whitespace in XAML
More about XAML Syntax
XAML Root Elements and xmlns
Events and XAML Code-Behind
Attached Properties and Attached Events
Base Classes and XAML
XAML Security
What's Next
Related Topics

XAML is a Declarative Language With Flow Control Support
XAML simplifies creating a UI for the .NET Framework 3.0 programming model. You can create visible UI elements in the declarative XAML markup, and then separate the UI definition from the run-time logic by using code-behind files, joined to the markup through partial class definitions. The ability to mix code with markup in XAML is important because XML by itself is declarative, and does not really suggest a model for flow control. An XML based declarative language is very intuitive for creating interfaces ranging from prototype to production, especially for people with a background in web design and technologies. Unlike most other markup languages, XAML directly represents the instantiation of managed objects. This general design principle enables simplified code and debugging access for objects that are created in XAML.

XAML files are XML files that generally have the .xaml extension.

The following XAML example shows how little markup is necessary to create a button as part of a UI. The created button has default visual presentation through theme styles, and default behaviors through its class design.

个人分类: XML
下一篇XAML - What is XAML?
想对作者说点什么? 我来说一句

XAML 文件格式化插件

2014年05月29日 55KB 下载