mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-05 07:56:11 +02:00
* add toc/bread changes * add xaml-services * add ported wpf content * add xaml-services info to docfx * Fix links 1 * Fix links 2 * Fix links 3 * Fix links 4 * Fix links 5 * Fix links 6 * Fix links 7 * Fix xaml-services link * Fix snippets 1 * Fix snippets 2 * adjust breadcrumb and toc * remove preserve-view from breadcrumbs * add empty view to toc item xaml * update include * remove contextual toc for vs article :(
43 lines
1.7 KiB
Markdown
43 lines
1.7 KiB
Markdown
---
|
|
title: "xml:space Handling in XAML"
|
|
ms.date: "03/30/2017"
|
|
helpviewer_keywords:
|
|
- "XAML [XAML Services], xml:space attribute"
|
|
- "XAML [XAML Services], white-space processing"
|
|
- "xml:space attribute [XAML Services]"
|
|
- "white-space processing [XAML Services]"
|
|
ms.assetid: 5e1814f0-5b30-43d5-8c88-dede335a89d7
|
|
---
|
|
# xml:space Handling in XAML
|
|
|
|
The `xml:space` attribute is an XML-defined attribute that declares the significant white-space processing behavior within an object element. This behavior is relevant for all content (inner text) contained within the element where `xml:space` is declared, and also scopes to child elements.
|
|
|
|
## XAML Attribute Usage
|
|
|
|
```xaml
|
|
<object xml:space="preserve" />
|
|
```
|
|
|
|
\- or -
|
|
|
|
```xaml
|
|
<object xml:space="default" />
|
|
```
|
|
|
|
## Remarks
|
|
|
|
The definition for the `xml:space` attribute in XAML including its two possible values is derived from `xml:space` as defined as a "special attribute" by W3C specifications for XML.
|
|
|
|
The default value of the `xml:space` attribute is the literal value `"default"`. For the value `"default"`, or if `xml:space` is not indicated at all, the behavior of significant white-space parsing is the default handling, as defined in the topic [White-space processing in XAML](white-space-processing.md).
|
|
|
|
To preserve white space within object element content, specify `xml:space="preserve"` on that object element.
|
|
|
|
Under most interpretations, the `xml:space` attribute effects and the value of the attribute are scoped to child elements.
|
|
|
|
For a complete discussion of white-space processing in XAML, see [White-space processing in XAML](white-space-processing.md).
|
|
|
|
## See also
|
|
|
|
- [White-space processing in XAML](white-space-processing.md)
|
|
- [XAML Overview (WPF)](../net/wpf/fundamentals/xaml.md)
|