-api-id | -api-type |
---|---|
P:Windows.UI.Xaml.Documents.Block.Margin |
winrt property |
Gets or sets the amount of space around a Block element.
<Paragraph Margin="uniform"/>
- or -
<Paragraph Margin="left+right,top+bottom"/>
- or -
<Paragraph Margin="left,top,right,bottom"/>
- 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.
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.
Thickness, Paragraph, FrameworkElement.Margin, Control.Padding