Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 2.26 KB

File metadata and controls

45 lines (35 loc) · 2.26 KB
-api-id -api-type
P:Microsoft.UI.Xaml.Documents.Block.Margin
winrt property

Microsoft.UI.Xaml.Documents.Block.Margin

-description

Gets or sets the amount of space around a Block element.

-xaml-syntax

<Paragraph Margin="uniform"/>
- or -
<Paragraph Margin="left+right,top+bottom"/>
- or -
<Paragraph Margin="left,top,right,bottom"/>
 

-xaml-values

uniform
uniform A value measured in pixels that specifies a uniform Thickness. The uniform value is applied to all four Thickness properties (Left, Top, Right, Bottom).
left+right
left+right A value measured in pixels that specifies the Left and Right of a symmetrical Thickness.
top+bottom
top+bottomA value measured in pixels that specifies the Top and Bottom of a symmetrical Thickness.
left top right bottom
left top right bottom Values measured in pixels that specify the four possible dimension properties of a Thickness (Left, Top, Right, Bottom). In the syntaxes shown previously, you can also use a space instead of a comma as the delimiter between values.
## -property-value The amount of space around a [Block](block.md) element.

-remarks

Code migration note Microsoft Silverlight doesn't support a Margin property on Block or Paragraph. Windows Presentation Foundation (WPF) has a Margin property on Block and Paragraph, but also has a Padding property there that the Windows Runtime doesn't support. If you need per-paragraph padding support, you might need to put each Paragraph in a different Border container and use a Panel for layout control, and set Border.Padding on each Border. Or, use RichTextBlock.

-examples

-see-also

Thickness, Paragraph, FrameworkElement.Margin, Control.Padding