Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Extensible Application Markup Language

From Wikipedia, the free encyclopedia
Language Microsoft developed for initializing structured values and objects
Extensible Application Markup Language (XAML)
Filename extension
.xaml
Internet media type
application/xaml+xml
Developed byMicrosoft
Initial releaseNovember 2006; 19 years ago (2006-11)[1]
Latest release
v2019
12 March 2019; 6 years ago (2019-03-12)[2]
Type of formatUser interface markup language
Extended fromXML

Extensible Application Markup Language (XAML/ˈzæməl/ ) is adeclarativeXML-based language developed byMicrosoft for initializing structured values and objects. It is available under Microsoft'sOpen Specification Promise.[3]

XAML is used extensively inWindows Presentation Foundation (WPF),Silverlight,Workflow Foundation (WF),Windows UI Library (WinUI),Universal Windows Platform (UWP), and.NET Multi-platform App UI (.NET MAUI). In WPF and UWP, XAML is auser interface markup language to define UI elements, data binding, and events. In WF, however, XAML definesworkflows.

XAML elements map directly toCommon Language Runtime (CLR) object instances, while XAML attributes map to CLR properties and events on those objects.

Anything that is created or implemented in XAML can be expressed using a more traditional .NET language, such asC# orVisual Basic .NET. However, a key aspect of the technology is the reduced complexity needed for tools to process XAML, because it is based on XML.[4]

Technology

[edit]

XAML originally stood for Extensible Avalon Markup Language,Avalon being the code-name forWindows Presentation Foundation (WPF).[5] Before the end of .NET Framework 3.0 development, however, Microsoft adopted XAML forWorkflow Foundation (WF).[5]

In WPF, XAML describes visualuser interfaces. WPF allows for the definition of both 2D and 3D objects, rotations, animations, and a variety of other effects and features. A XAML file can be compiled into aBinary Application Markup Language (BAML) file,[5][6] which may be inserted as a resource into a .NET Framework assembly. At run-time, the framework engine extracts the BAML file from assembly resources, parses it, and creates a corresponding WPF visual tree or workflow.

In WF contexts, XAML describes potentially long-running declarative logic, such as those created by process modeling tools and rules systems. Theserialization format for workflows was previously called XOML, to differentiate it from UI markup use of XAML, but now they are no longer distinguished. However, the file extension for files containing the workflow markup is still ".xoml".[7]

XAML uses a specific way to definelook and feel calledTemplates; differing fromCascading Style Sheet syntax, it is closer toXBL.[8]

To create XAML files, one could useMicrosoft Expression Blend,Microsoft Visual Studio, the hostable WF visual designer, or XAMLPad.[9]

Examples

[edit]

This Windows Presentation Foundation example shows the text "Hello, world!" in the top-level XAML container called Canvas.

<Canvasxmlns="http://schemas.microsoft.com/client/2010"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"><TextBlock>Hello,world!</TextBlock></Canvas>

The schema (thexmlns="http://schemas.microsoft.com/..." part) may have to be changed to work on some computers. Using a schema that Microsoft recommends, the example can also be[10]

<Canvasxmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"><TextBlock>Hello,world!</TextBlock></Canvas>

A crucial part of utilizing XAML to its full potential is making appropriate usage of binding, as well as creating custom user elements as required. Binding can be done as follows:

<TextBoxx:Name="txtInput"/><TextBlockText="{Binding ElementName=txtInput,Path=Text}"/>

Differences between versions of XAML

[edit]

There are three main Microsoft implementations of XAML:

These versions have some differences in the parsing behavior.[11] Additionally, the Silverlight 4 XAML parser is not 100%backward-compatible with Silverlight 3 files. Silverlight 3 XAML files may be rejected or parsed differently by the Silverlight 4 parser.[12]

XAML applications in web browsers

[edit]

Historically, XAML based applications could be run in someweb browsers, such asInternet Explorer andFirefox. This could be achieved throughXBAP files created fromWPF applications, or via theSilverlight browser plugin. However, both these methods are now unsupported on all major browsers due to their reliance on the discontinuedNPAPI browser plugin interface.[13][14]

Lock-in concerns

[edit]

In 2007,European Committee for Interoperable Systems (ECIS) – a coalition of mostly American software companies – accused Microsoft of attempting to hijack HTML and replace it with XAML, thus creating avendor lock-in.[15][16] Jeremy Reimer, writing forArs Technica described this comment as "the most egregious error" and added that XAML is unlikely to ever replace HTML.[16]

See also

[edit]

References

[edit]
  1. ^"[MS-XAML] Xaml Object Mapping Specification 2006"(PDF).Microsoft. June 2008.
  2. ^"Extensible Application Markup Language (XAML)".Microsoft. 12 March 2019.
  3. ^Worthington, David."Microsoft adds XAML to 'Open Specification' list – Software Development Times On The Web". Archived fromthe original on 2008-12-11. Retrieved2021-04-06.
  4. ^"XAML Syntax In Detail".Windows Presentation Foundation library.Microsoft. 12 August 2021 – viaMicrosoft Docs.
  5. ^abcRob Relyea : January 2004 – Posts
  6. ^unknown (2009-07-30)."What is BAML?". DOTNET Spider.BAML means Binary Application Markup Language, which is a compiled version of the XAML. When you compile your XAML it creates the BAML file.
  7. ^Andrew, Paul (25 January 2006)."xoml or xaml?".MSDN Community Archive.Microsoft. Archived fromthe original on November 28, 2020.Workflow programs (or models) are saved in the XAML format which is common to Avalon for serializing .NET types as XML. Avalon XAML is all about UI and Workflow XAML is all about business process so there's quite a semantic difference. The XOML file extension looks to remain for Workflow models though the file format is XAML.
  8. ^Guthrie, Scott (22 February 2008)."Silverlight Tutorial Part 7: Using Control Templates to Customize a Control's Look and Feel".ScottGu's Blog.
  9. ^Avery, James; Holmes, Jim."3.3 Writing XAML in XamlPad - Windows Developer Power Tools [Book]".www.oreilly.com. O'Reilly.
  10. ^Microsoft XAML Overview page atXAML Overview (Root element and xmlns)
  11. ^"XAML Processing Differences Between Silverlight Versions and WPF".Silverlight Archive.Microsoft. 17 November 2011 – viaMicrosoft Docs.Silverlight includes a XAML parser that is part of the Silverlight core install. Silverlight uses different XAML parsers depending on whether your application targets Silverlight 3 or Silverlight 4. The two parsers exist side-by-side in Silverlight 4 for compatibility. In some cases, the XAML parsing behavior in Silverlight differs from the parsing behavior in Windows Presentation Foundation (WPF). WPF has its own XAML parser.
  12. ^"XAML Processing Differences Between Silverlight Versions".Silverlight Archive.Microsoft. 17 November 2011 – viaMicrosoft Docs.
  13. ^adegeo."FAQ about XBAP supportability".learn.microsoft.com. Retrieved2024-05-16.
  14. ^nakarnam (2020-03-16)."Silverlight End of Support - Microsoft Lifecycle".learn.microsoft.com. Retrieved2024-05-16.
  15. ^Beer, Stan (28 January 200)."Microsoft runs into EU Vista charges".iTWire. Retrieved22 August 2013.
  16. ^abReimer, Jeremy (26 January 2007)."European committee chair accuses Microsoft of hijacking the web".Ars Technica.Condé Nast. Retrieved22 August 2013.

External links

[edit]
Wikibooks has a book on the topic of:.NET Development Foundation
Implementations
Architecture
Components
Tools
Decompilers
Obfuscators
IDEs
Organizations
Low-level platform-specific
OnAmigaOS
OnClassic Mac OS,macOS
OnWindows
OnUnix
OnBeOS,Haiku
OnAndroid
CLI
Low Level Cross-platform
CLI
C
Java
High-level, platform-specific
OnAmigaOS
OnClassic Mac OS,macOS
Object Pascal
Objective-C,Swift
C++
CLI
OnWindows
CLI
C++
Object Pascal
OnUnix andX11
High-level, cross-platform
C
C++
Objective-C
CLI
Adobe Flash
Go
Haskell
Java
JavaScript
Common Lisp
Lua
Pascal
Object Pascal
Perl
PHP
Python
Ruby
Tcl
XML
shell
Dart
Raster
Raw
Vector
Compound
Metadata
Office suite
Well-known
Lesser-known
Retrieved from "https://en.wikipedia.org/w/index.php?title=Extensible_Application_Markup_Language&oldid=1295659009"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp