System.Windows.Markup 命名空间

提供用于支持 XAML 的类型。 Provides types to support XAML. 其中一些类型位于 WPF 程序集中,由涉及 XAML 的 WPF 方案专用。 Some of these types are located in WPF assemblies and are specific to WPF scenarios that involve XAML. 此命名空间中的其他类型通常为 .NET Framework XAML 服务提供支持,不需要引用 WPF 程序集。 Other types in this namespace provide support for .NET Framework XAML Services in general, and do not require referencing WPF assemblies.

AcceptedMarkupExtensionExpressionTypeAttribute

以符号表示 XAML 标记扩展特征的旧报告的类型。Notates types for legacy reporting of XAML markup extension characteristics.

AmbientAttribute

指定应将某个属性或类型视为环境。Specifies that a property or type should be treated as ambient. 环境概念涉及 XAML 处理器如何确定成员的类型所有者。The ambient concept relates to how XAML processors determine type owners of members.

ArrayExtension

实现对 .NET Framework XAML 服务的 x:Array 支持。Implements x:Array support for .NET Framework XAML Services.

ComponentResourceKeyConverter

实现 ComponentResourceKey 对象的类型转换器,经过考虑,该转换器没有类型转换路径。Implements a type converter for ComponentResourceKey objects, which deliberately have no type conversion pathways. 类型转换器强制执行并报告该行为。The type converter enforces and reports that behavior.

ConstructorArgumentAttribute

指定可以使用非无参数构造函数语法来初始化对象,而且由指定名称的属性提供构造信息。Specifies that an object can be initialized by using a non-parameterless constructor syntax, and that a property of the specified name supplies construction information. 此信息主要用于 XAML 序列化。This information is primarily for XAML serialization.

ContentPropertyAttribute

指示某种类型的哪个属性是 XAML 内容属性。Indicates which property of a type is the XAML content property. 处理特性化类型的 XAML 表示形式的 XAML 子元素时,XAML 处理器会使用此信息。A XAML processor uses this information when processing XAML child elements of XAML representations of the attributed type.

ContentWrapperAttribute

指定将用于包装外部内容的关联集合类型的一个或多个类型。Specifies one or more types on the associated collection type that will be used to wrap foreign content.

DateTimeValueSerializer

String 的实例与 DateTime 的实例之间进行转换。Converts instances of String to and from instances of DateTime.

DependencyPropertyConverter

将字符串转换为 DependencyProperty 对象。Converts from a string to a DependencyProperty object.

DependsOnAttribute

指示特性化属性依赖于另一个属性的值。Indicates that the attributed property is dependent on the value of another property.

DesignerSerializationOptionsAttribute

指定属性的序列化标志。Specifies the serialization flags for a property.

DictionaryKeyPropertyAttribute

指定提供隐式键值的关联类的属性。Specifies a property of the associated class that provides the implicit key value. 隐式键用于某些键,而不是用于在 XAML 中为 IDictionary 集合中的项定义的 x:Key 特性。Implicit keys are used for keys rather than explicit x:Key attributes defined in XAML for an item in IDictionary collections.

EventSetterHandlerConverter

将事件 setter 处理程序的字符串名称转换为委托表示形式。Converts the string name of an event setter handler to a delegate representation.

InternalTypeHelper

由 WPF XAML 编译器在内部使用的抽象类,用于支持使用内部类型。Abstract class used internally by the WPF XAML compiler to support the use of internal types.

MarkupExtension

为可以由 .NET Framework XAML 服务及其他 XAML 读取器和 XAML 编写器支持的 XAML 标记扩展实现提供基类。Provides a base class for XAML markup extension implementations that can be supported by .NET Framework XAML Services and other XAML readers and XAML writers.

MarkupExtensionBracketCharactersAttribute

报告标记扩展可以返回的括号字符。Reports the bracket characters that a markup extension can return.

MarkupExtensionReturnTypeAttribute

报告标记扩展可以返回的类型。Reports the type that a markup extension can return.

MemberDefinition

提供基类,该基类用于在声明性 XAML 中定义类成员的标记技术。Provides the base class that is used for a markup technique of defining members of a class in declarative XAML.

NameReferenceConverter

提供类型转换,以将字符串名称转换成对具有该名称的对象的对象引用,或返回对象图中对象的名称。Provides type conversion to convert a string name into an object reference to the object with that name, or to return the name of an object from the object graph.

NameScopePropertyAttribute

指定提供 XAML 名称范围值的关联类的属性。Specifies a property of the associated class that provides the XAML namescope value.

NamespaceMapEntry

提供 XamlTypeMapper 在 XML 命名空间、CLR 命名空间以及包含该 CLR 命名空间的相关类型的程序集之间建立映射所使用的信息。Provides information that the XamlTypeMapper uses for mapping between an XML namespace, a CLR namespace, and the assembly that contains the relevant types for that CLR namespace.

NullExtension

实现 XAML 标记以返回 null 对象,可使用该对象在 XAML 中将值显式设置为 null。Implements a XAML markup extension in order to return a null object, which you can use to explicitly set values to null in XAML.

ParserContext

提供 XAML 分析器所需的上下文信息。Provides context information required by a XAML parser.

PropertyDefinition

支持在声明性 XAML 中定义类属性的标记技术。Supports a markup technique of defining properties of a class in declarative XAML.

Reference

实现 {x:Reference} 标记扩展。Implements the {x:Reference} markup extension.

ResourceReferenceExpressionConverter

ResourceReferenceExpression 的实例和其他类型之间来回转换。Converts instances of ResourceReferenceExpression to and from other types.

RootNamespaceAttribute

表示一个程序集级别特性,它用于标识 Visual Studio 项目文件中 RootNamespace 属性的值。Represents an assembly level attribute that is used to identify the value of the RootNamespace property in a Visual Studio project file.

RoutedEventConverter

从字符串中转换 RoutedEvent 对象。Converts a RoutedEvent object from a string.

RuntimeNamePropertyAttribute

表示类型级别的特性,该特性报告类型的哪个属性映射到 XAML x:Name 特性Represents a type-level attribute that reports which property of the type maps to the XAML x:Name attribute.

ServiceProviders

使用可以添加服务的方法来提供 IServiceProvider 接口的实现。Provides an implementation for the IServiceProvider interface with methods that enable adding services.

SetterTriggerConditionValueConverter

为处理 Setter 值的 TriggerConditionDependencyProperty 类型提供类型转换模拟行为。Provides type conversion analogous behavior for Setter, Trigger and Condition types that deal with DependencyProperty values. 此转换器仅支持 ConvertFromThis converter only supports ConvertFrom.

StaticExtension

实现返回静态字段和属性引用的标记扩展。Implements a markup extension that returns static field and property references.

TemplateKeyConverter

实现 TemplateKey 对象的类型转换器,经过考虑,该转换器没有类型转换路径。Implements a type converter for TemplateKey objects, which deliberately have no type conversion pathways. 类型转换器强制执行并报告该行为。The type converter enforces and reports that behavior.

TrimSurroundingWhitespaceAttribute

向 XAML 处理器指示在序列化时应修剪标记中该类型元素四周的空白。Indicates to XAML processors that the whitespace surrounding elements of the type in markup should be trimmed when serializing.

TypeExtension

实现根据字符串输入返回 Type 的标记扩展。Implements a markup extension that returns a Type based on a string input.

UidPropertyAttribute

指示提供 X:uid 指令值的类的 CLR 属性。Indicates the CLR property of a class that provides the x:Uid Directive value.

UsableDuringInitializationAttribute

指示在 XAML 对象图创建期间是否自上而下生成此类型。Indicates whether this type is built top-down during XAML object graph creation.

ValueSerializer

定义从对象表示形式进行序列化过程中的转换行为的抽象类。Abstract class that defines conversion behavior for serialization from an object representation.

ValueSerializerAttribute

标识类型或属性在序列化时应使用的 ValueSerializer 类。Identifies the ValueSerializer class that a type or property should use when it is serialized.

WhitespaceSignificantCollectionAttribute

指示应该由 XAML 处理器将集合类型处理为空白有意义的。Indicates that a collection type should be processed as being whitespace significant by a XAML processor.

XamlDeferLoadAttribute

指示类或属性具有 XAML 的延迟加载用途(如模板行为),并报告启用延迟行为及其目标/内容类型的类。Indicates that a class or property has a deferred load usage for XAML (such as a template behavior), and reports the class that enables the deferring behavior and its destination/content type.

XamlDesignerSerializationManager

为要求高级序列化的 XAML 设计器或其他调用方进行的 XAML 序列化提供服务。Provides services for XAML serialization by XAML designers or other callers that require advanced serialization.

XamlInstanceCreator

提供用来存储分析器记录(供以后实例化时使用)的方法的抽象类。Abstract class that provides a means to store parser records for later instantiation.

XamlParseException

表示来自 WPF 分析器的、特定于分析器的异常的异常类。Represents the exception class for parser-specific exceptions from a WPF XAML parser. 此异常用于 .NET Framework 3.0 和 .NET Framework 3.5 中的 XAML API 或 WPF XAML 分析器操作,或者通过调用 XamlReader API 而特别用于 WPF XAML 分析器。This exception is used in XAML API or WPF XAML parser operations from .NET Framework 3.0 and .NET Framework 3.5, or for specific use of the WPF XAML parser by calling XamlReader API.

XamlReader

使用 WPF 默认 XAML 读取器和关联的 XAML 对象编写器读取 XAML 输入并创建对象图。Reads XAML input and creates an object graph, using the WPF default XAML reader and an associated XAML object writer.

XamlSetMarkupExtensionAttribute

指示类可以使用标记扩展提供值,并引用要用于标记扩展设置操作的处理程序。Indicates that a class can use a markup extension to provide a value, and references a handler to use for markup extension set operations.

XamlSetMarkupExtensionEventArgs

为 XAML 对象编写器在使用标记扩展设置值时调用的回调提供数据。Provides data for callbacks that are invoked when a XAML object writer sets a value using a markup extension.

XamlSetTypeConverterAttribute

指示类可以使用类型转换器提供值,并引用要用于类型转换器设置情况的处理程序。Indicates that a class can use a type converter to provide a value, and references a handler to use for type converter setting cases.

XamlSetTypeConverterEventArgs

为 XAML 编写器在使用类型转换器调用设置值时调用的回调提供数据。Provides data for callbacks that are invoked when a XAML writer sets a value using a type converter call.

XamlSetValueEventArgs

XamlObjectWriter 在设置某些值时调用的回调提供数据。Provides data for callbacks that are invoked when a XamlObjectWriter sets certain values.

XamlTypeMapper

将 XAML 元素名称映射到程序集中适当的 CLR TypeMaps a XAML element name to the appropriate CLR Type in assemblies.

XamlWriter

提供一个静态 Save 方法(多次重载),该方法可用于以受限的 XAML 序列化方式,将所提供的运行时对象序列化为 XAML 标记。Provides a single static Save method (multiple overloads) that can be used for limited XAML serialization of provided run-time objects into XAML markup.

XData

表示可显示为 Value 节点的值的 literal 数据。Represents literal data that can appear as the value for a Value node.

XmlAttributeProperties

封装 DependencyObject 的 XML 语言特定的特性。Encapsulates the XML language-related attributes of a DependencyObject.

XmlLangPropertyAttribute

标识要与 xml:lang 特性关联的属性。Identifies the property to associate with the xml:lang attribute.

XmlLanguage

表示供 XMAL 标记中使用的语言标记。Represents a language tag for use in XAML markup.

XmlLanguageConverter

提供 XmlLanguage 类的类型转换。Provides type conversion for the XmlLanguage class.

XmlnsCompatibleWithAttribute

指定一个 XAML 命名空间可以由另一个 XAML 命名空间归入。Specifies that a XAML namespace can be subsumed by another XAML namespace. 通常,先前定义的 XmlnsDefinitionAttribute 中指示了包含 XAML 命令空间。Typically, the subsuming XAML namespace is indicated in a previously defined XmlnsDefinitionAttribute.

XmlnsDefinitionAttribute

指定 XAML 命名空间与 CLR 命名空间之间按程序集进行的映射,然后 XAML 对象编写器或 XAML 架构上下文将其用于类型解析。Specifies a mapping on a per-assembly basis between a XAML namespace and a CLR namespace, which is then used for type resolution by a XAML object writer or XAML schema context.

XmlnsDictionary

表示包含 WPF 中 XAML 命名空间的 xmlns 映射的字典。Represents a dictionary that contains xmlns mappings for XAML namespaces in WPF.

XmlnsPrefixAttribute

标识一个建议的前缀,用于在向 XAML 文件中写入元素和特性(序列化)时或与具有 XAML 编辑功能的设计环境交互时与 XAML 命名空间关联以便使用 XAML。Identifies a recommended prefix to associate with a XAML namespace for XAML usage, when writing elements and attributes in a XAML file (serialization) or when interacting with a design environment that has XAML editing features.

接口

IAddChild

提供分析允许混合子元素或文本的元素所需的方法。Provides a means to parse elements that permit mixtures of child elements or text.

IComponentConnector

为命名的 XAML 元素以及将事件处理程序附加到这些元素提供标记编译和工具支持。Provides markup compile and tools support for named XAML elements and for attaching event handlers to them.

INameScope

关于如何在特定的 XMAL 名称范围内访问元素的名称,以及如何强制该 XAML 名称范围内名称的唯一性,定义一个协定。Defines a contract for how names of elements should be accessed within a particular XAML namescope, and how to enforce uniqueness of names within that XAML namescope.

INameScopeDictionary

将可枚举的集合和字典支持进行了统一,可用于公开 XAML 名称范围中名称的字典。Unifies enumerable, collection, and dictionary support that are useful for exposing a dictionary of names in a XAML namescope.

IProvideValueTarget

表示一个服务,该服务报告标记扩展评估的情景对象和属性的关系。Represents a service that reports situational object-property relationships for markup extension evaluation.

IQueryAmbient

查询是否应将指定的属性视为当前范围中的环境属性。Queries for whether a specified property should be treated as ambient in the current scope.

IReceiveMarkupExtension

提供一种机制,通过该机制,类型可以声明它们可从标记扩展接收表达式(或另一个类),其中的输出是一个与目标属性不同的属性类型。Provides a mechanism whereby types can declare that they can receive an expression (or another class) from a markup extension, where the output is a different property type than the target property. 请不要用于 .NET Framework 4 实现。Do not use for .NET Framework 4 implementations.

IStyleConnector

提供 WPF XAML 分析器在内部用于在已编译的 XAML 中附加事件和事件 setter 的方法。Provides methods used internally by the WPF XAML parser to attach events and event setters in compiled XAML.

IUriContext

表示一个服务,该服务可使用应用程序上下文将提供的相对 URI 解析成绝对 URI。Represents a service that can use application context to resolve a provided relative URI to an absolute URI.

IValueSerializerContext

定义提供给 ValueSerializer 的上下文。Defines a context that is provided to a ValueSerializer. 此上下文可用于实现序列化的特例或序列化的其他模式。The context can be used to enable special cases of serialization or different modes of serialization.

IXamlTypeResolver

表示一种服务,该服务将 XAML 标记中的已命名元素解析为适当的 CLR 类型。Represents a service that resolves from named elements in XAML markup to the appropriate CLR type.

枚举

DesignerSerializationOptions

指定要如何序列化属性。Specifies how a property is to be serialized.

XamlWriterMode

指定用于序列化作为表达式(如绑定声明)的值的 XAML 编写器模式。Specifies the XAML writer mode for serializing values that are expressions (such as binding declarations).

XamlWriterState

描述自定义 XAML 编写器的可能的编写状态。Describes possible writing states for a custom XAML writer.