Sdílet prostřednictvím


Windows.UI.Xaml.Markup Namespace

Provides XAML language support API for UWP app and the Windows Runtime.

Classes

ContentPropertyAttribute

Indicates which property of a type is the XAML content property. A XAML processor uses this information when processing XAML child elements of XAML representations of the attributed type.

FullXamlMetadataProviderAttribute

Indicates that the XAML metadata in a component library is complete.

MarkupExtension

Provides a base class for XAML markup extension implementations.

MarkupExtensionReturnTypeAttribute

Reports the type that a markup extension can return.

XamlBinaryWriter

Produces a pre-parsed binary representation of a XAML production.

XamlBindingHelper

Provides helper methods for data binding.

XamlMarkupHelper

Provides helper methods for the XAML compiler.

XamlReader

Provides a XAML processor engine for parsing XAML and creating corresponding object trees.

Structs

XamlBinaryWriterErrorInformation

Records error information produced by calls to XamlBinaryWriter.Write.

XmlnsDefinition

Specifies a mapping on a per-assembly basis between a XAML namespace and a library-code namespace for backing types, which is then used for type resolution by a XAML object writer or XAML schema context.

Interfaces

IComponentConnector

Provides infrastructure support for event wiring and build actions.

IComponentConnector2

Provides infrastructure support for event wiring and build actions.

IDataTemplateComponent

Provides methods that enable the XAML parser to communicate with generated binding code.

IXamlBindScopeDiagnostics

Provides methods that enable a debugger to disable generated binding code.

IXamlMember

Provides the means to report XAML-type system specifics about XAML members. Using this interface contract, XAML parsers can load any custom types and members thereof that are defined in your app and are referenced in XAML files.

IXamlMetadataProvider

Implements XAML type resolution and provides the mapping between types used in markup and the corresponding classes implemented in an application or component.

IXamlType

Provides the means to report XAML-type system specifics about XAML types. Using this interface contract, XAML parsers can load any custom types and members thereof that are defined in your app and are referenced in XAML files.

IXamlType2

Provides the means to report XAML-type system specifics about XAML types. Using this interface contract, XAML parsers can load any custom types and members thereof that are defined in your app and are referenced in XAML files.

Remarks

Many of the types in this namespace are infrastructure or types that support uncommon scenarios. But there are two types in this namespace that apps might use in more typical app scenarios.

  • XamlParseException is the specialized exception that is thrown by the Windows Runtime XAML parser in cases where it attempts to load XAML but can't generate the expected run-time object tree from that XAML. Most of the time any problems with XAML are detectable at design-time, but it's still possible for problems to occur that would only be known at run-time, in which case you get a XamlParseException. XamlParseException is only thrown if your app is written using C# or Microsoft Visual Basic (Visual C++ component extensions (C++/CX) uses Platform::COMException instead).
  • XamlReader is a static class that can parse XAML and produce object trees. This class enables run-time access to the Windows Runtime XAML parser, the same parser that's used when XAML UI definition pages are parsed into object representations when an app starts. You can then connect the generated object tree to other existing UI elements and make the new objects appear in your UI.

See also