Back to Devexpress

AppearanceOptions.UseTextOptions Property

windowsforms-devexpress-dot-utils-dot-appearanceoptions-ad4098ae.md

latest5.0 KB
Original Source

AppearanceOptions.UseTextOptions Property

Gets or sets whether to use the AppearanceObject.TextOptions property value.

Namespace : DevExpress.Utils

Assembly : DevExpress.Utils.v25.2.dll

NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core

Declaration

csharp
[DefaultValue(false)]
[DXCategory("Font")]
[XtraSerializableProperty]
public virtual bool UseTextOptions { get; set; }
vb
<DefaultValue(False)>
<XtraSerializableProperty>
<DXCategory("Font")>
Public Overridable Property UseTextOptions As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true to use the AppearanceObject.TextOptions property value; false to use the text options specified by the parent appearance object.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to UseTextOptions
AppearanceObject

.Options .UseTextOptions

| | AppearanceOptions |

.Empty .UseTextOptions

|

Remarks

If the current appearance object has no parent, the AppearanceObject.TextOptions property value is used regardless of the UseTextOptions property setting. Please refer to the Look and Feel topic for details.

When an AppearanceObject’s style setting (for example, BackColor , ForeColor , Font and TextOptions.HAlignment ) is set to a non-default value, the corresponding Options.Use… option (for instance, Options.UseBackColor , Options.UseForeColor , Options.UseFont and Options.UseTextOptions ) is automatically set to true in the following cases:

  • The AppearanceObject belongs to a control/component (or its element), and this control/component has been completely loaded (see the control’s IsLoading property to check the load status);
  • The AppearanceObject belongs to a grid column/band or tree list column/band, and the column/band belongs to a grid/tree list control;
  • The AppearanceObject is standalone, that is, it does not belong to any control or component.

In other cases, the Options.Use… options are not automatically enabled. You may need to enable these options manually for the style settings to be in effect.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the UseTextOptions property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-treelist-create-file-manager-drag-drop-files-folders/CS/FileList/FileListHelper.cs#L59

csharp
this.treeListColumn4.AppearanceCell.Options.UseTextOptions = true;
this.treeListColumn4.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;

winforms-treelist-create-file-manager-drag-drop-files-folders/VB/FileList/FileListHelper.vb#L55

vb
treeListColumn3.Visible = True
treeListColumn4.AppearanceCell.Options.UseTextOptions = True
treeListColumn4.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far

See Also

TextOptions

GetTextOptions()

Look and Feel

AppearanceOptions Class

AppearanceOptions Members

DevExpress.Utils Namespace