Block.Margin Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public:
property Thickness Margin { Thickness get(); void set(Thickness value); };
Thickness Margin();
void Margin(Thickness value);
public Thickness Margin { get; set; }
var thickness = block.margin;
block.margin = thickness;
Public Property Margin As Thickness
<Paragraph Margin="uniform"/>
- or -
<Paragraph Margin="left+right,top+bottom"/>
- or -
<Paragraph Margin="left,top,right,bottom"/>
Property Value
The amount of space around a Block 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.