Back to Devexpress

CommentOptions.Visibility Property

officefileapi-devexpress-dot-xtrarichedit-dot-commentoptions.md

latest4.0 KB
Original Source

CommentOptions.Visibility Property

Specifies the visibility mode of a document comment.

Namespace : DevExpress.XtraRichEdit

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
[DefaultValue(RichEditCommentVisibility.Auto)]
public RichEditCommentVisibility Visibility { get; set; }
vb
<DefaultValue(RichEditCommentVisibility.Auto)>
Public Property Visibility As RichEditCommentVisibility

Property Value

TypeDefaultDescription
RichEditCommentVisibilityAuto

A RichEditCommentVisibility enumeration value.

|

Available values:

NameDescription
Auto

Comment visibility is determined automatically.

| | Visible |

Comments are always visible.

| | Hidden |

Comments are always hidden.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to Visibility
AnnotationOptions

.Comments .Visibility

| | RichEditControlOptionsBase |

.Comments .Visibility

|

Remarks

When the CommentOptions.Visibility is set to RichEditCommentVisibility.Visible, the comment balloons are displayed and document ranges are highlighted. You can hide comments and highlight commented ranges by setting the Visibility to Hidden and the CommentOptions.HighlightCommentedRange option - to true. Note that the Visibility property value changes to Visible after adding a new comment.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Visibility 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-richedit-document-api/CS/RichEditAPISample/DisplayResultControl.cs#L20

csharp
InitializeComponent();
richEditControl1.Options.Comments.Visibility = DevExpress.XtraRichEdit.RichEditCommentVisibility.Hidden;
richEditControl1.Options.Comments.ShowAllAuthors = true;

winforms-richedit-document-api/VB/RichEditAPISample/DisplayResultControl.vb#L14

vb
InitializeComponent()
richEditControl1.Options.Comments.Visibility = RichEditCommentVisibility.Hidden
richEditControl1.Options.Comments.ShowAllAuthors = True

See Also

CommentOptions Class

CommentOptions Members

DevExpress.XtraRichEdit Namespace