Click or drag to resize
AB4D logo

TextBlockVisual3D Properties

The TextBlockVisual3D type exposes the following members.

Properties
 NameDescription
Public propertyBackground Gets or sets the Brush that fill the background of the textBorder.
Public propertyBackMaterial Gets a Material that is used to show the text and border on the back side of the plane model defined by the textGeometryModel3D. Back material can be changed from a derived class with changing the protected backMaterial field.
Public propertyBorderBrush Gets or sets the Brush of the border.
Public propertyBorderSize Gets or sets a Size that can be set to define the 2D size of the Border element. By default BorderSize is set to Size.Empty. This automatically scales the Border element to show the whole TextBlock element. But when you want to trim the text, you need to set the BorderSize to a valid size value.
Public propertyBorderThickness Gets or sets the thickness of the border.
Public propertyFontFamily Gets or sets the FontFamily of the text.
Public propertyFontSize Gets or sets the size of the text
Public propertyFontWeight Gets or sets the FontWeight of the text.
Public propertyForeground Gets or sets the foreground brush of the text.
Public propertyInlines Gets InlineCollection from the TextBlock Inlines property. This property can be used to show text with different colors and fonts. After Inlines are manually added, you need to call Refresh method to update the size and rendering of the TextBlockVisual3D.
Public propertyIsBackSidedTextFlipped Gets or sets a Boolean that specifies if the text on the back side is horizontally flipped so that it appears correct when viewing from the back side. When false (by default), the text on front and back side is the same. This property has effect only when IsTwoSidedText property is set to true.
Public propertyIsDisposed Gets a Boolean that specified is this TextBlockVisual3D has been disposed.
Public propertyIsTwoSidedText Gets or sets a Boolean that specifies if the plane 3D models shows text on both front and back sides. If IsTwoSidedText is false, then only the front material is set. This can improve performance because the text is rendered only once. Default value is true. To control orientation of the back sided text, see also the IsBackSidedTextFlipped property.
Public propertyMaterial Gets a Material that is used to show the text and border on the front side of the plane model defined by the textGeometryModel3D. Front material can be changed from a derived class with changing the protected frontMaterial field.
Public propertyPosition Gets or sets the position of the text. What point on 3D model is represented by this property is specified by PositionType property (TopLeft by default).
Public propertyPositionType Gets or sets a PositionTypes the what point on the 3D model the Position property represents. Default value is TopLeft.
Public propertyRenderBitmapSize When set to a valid size value (not Empty or with 0 Width or Height), then TextBlock and Border elements are rendered to bitmap and that bitmap is then shown on a 3D model. When set to Empty then TextBlockVisual3D is using a DiffuseMaterial with a VisualBrush that show TextBlock and Border. Setting RenderBitmapSize can increase initialization time but can significantly improve rendering performance. When used in DXEngine it is highly recommended to set this property. Default value is Size.Empty; but when rendered with Ab3d.DXEngine the default value is set to DefaultDXEngineRenderBitmapSize (512 x 256).
Public propertySize Gets or sets a Size of the 3D plane model that will show the text. When the Size is Empty (by default), the BorderSize will be used. If BorderSize is also Empty, then TextBlock will be measured and its desired size will be used. It is also possible to set only Size.Height and leave Size.Width 0 or NaN. In this case the used width will be calculated from BorderSize or TextBlock size. This way it is easy to specify only the desired text height in 3D space and the TextBlockVisual3D will automatically calculate the width of the model.
Public propertyText Gets or sets the text that is displayed with 3D lines.
Public propertyTextAlignment Gets or sets a value that indicates the horizontal alignment of text content.
Public propertyTextDirection Gets or sets the Vector3D that is pointing in the direction in which the text is drawn. Default value is (1,0,0).
Public propertyTextHorizontalAlignment Gets or sets a HorizontalAlignment that specifies the horizontal alignment of the TextBlock inside the Border element. BorderSize property needs to be set for this property to have any effect. Default value is Left.
Public propertyTextPadding Gets or sets a Thickness that specifies the padding of the TextBlock element inside the textBorder element.
Public propertyTextTrimming Gets or sets the TextTrimming of the text. This property will have no effect if BorderSize is not set because the default behavior without BorderSize set is to adjust the size of the text to fit the allotted space. Note that if this property is set to TextTrimming.CharacterEllipsis and the text consists of multiple lines of text where each line is separated by a line feed, then an ellipsis will appear on each line that exceeds the allocated space. See also TextWrapping property.
Public propertyTextVerticalAlignment Gets or sets a VerticalAlignment that specifies the horizontal alignment of the TextBlock inside the Border element. BorderSize property needs to be set for this property to have any effect. Default value is Center.
Public propertyTextWrapping Gets or sets the TextBlockVisual3D should wrap the text. Default is NoWarp. For TextWrapping to have effect, you need to set the BorderSize property (it should not be set to Size.Empty).
Public propertyUpDirection Gets or sets the Vector3D that is pointing in the text's up direction. Default value is (0,1,0).
Public propertyUseMatrixTransform3D When UseMatrixTransform3D is true then this TextBlockVisual3D is created with a standard and shared MeshGeometry3D and uses a UseMatrixTransform3D to position, scale and orient the plane to the desired location, size and direction. This gives a big performance improvement. When false, each TextBlockVisual3D is using a unique MeshGeometry3D that is updated according to the position, scale and direction. This means that on each property change a new MeshGeometry3D is created. Default value is true.
Top
See Also