Figure.WrapDirection 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个值,该值指示内容可用其环绕 Figure 的允许方式。
public:
property System::Windows::WrapDirection WrapDirection { System::Windows::WrapDirection get(); void set(System::Windows::WrapDirection value); };
public System.Windows.WrapDirection WrapDirection { get; set; }
member this.WrapDirection : System.Windows.WrapDirection with get, set
Public Property WrapDirection As WrapDirection
属性值
WrapDirection 枚举的一个成员,它指定内容可用其环绕 Figure 的允许方式。
默认值是 Both。
示例
以下示例演示如何设置 WrapDirection 元素的 Figure 属性。
<FlowDocument>
<Paragraph>
<Figure
Name="myFigure"
Width="140" Height="50"
HorizontalAnchor="PageCenter"
VerticalAnchor="PageCenter"
HorizontalOffset="100"
VerticalOffset="20"
WrapDirection="Both"
/>
</Paragraph>
</FlowDocument>
下面的示例演示如何以编程方式设置 WrapDirection 属性。
Figure figx = new Figure();
figx.Name = "myFigure";
figx.Width = new FigureLength(140);
figx.Height = new FigureLength(50);
figx.HorizontalAnchor = FigureHorizontalAnchor.PageCenter;
figx.VerticalAnchor = FigureVerticalAnchor.PageCenter;
figx.HorizontalOffset = 100;
figx.VerticalOffset = 20;
figx.WrapDirection = WrapDirection.Both;
Paragraph parx = new Paragraph(figx);
FlowDocument flowDoc = new FlowDocument(parx);
Dim figx As New Figure()
With figx
.Name = "myFigure"
.Width = New FigureLength(140)
.Height = New FigureLength(50)
.HorizontalAnchor = FigureHorizontalAnchor.PageCenter
.VerticalAnchor = FigureVerticalAnchor.PageCenter
.HorizontalOffset = 100
.VerticalOffset = 20
.WrapDirection = WrapDirection.Both
End With
Dim parx As New Paragraph(figx)
Dim flowDoc As New FlowDocument(parx)
注解
依赖项属性信息
标识符字段 | WrapDirectionProperty |
元数据属性设置为 true |
AffectsParentMeasure |