IsCommonValueSelected Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
Description
Informs about whether a certain attribute has the same value for the complete selection.
Syntax
IsCommonValueSelected(Selection.Attribute)
Informs about whether an attribute from the Selection.Attribute enumeration has the same value for the complete selection.
public bool IsCommonValueSelected(Selection.Attribute attribute);Public Function IsCommonValueSelected(attribute As Selection.Attribute) As Boolean| Parameter | Description |
|---|---|
| attribute | Specifies a possible value from the enumeration. |
IsCommonValueSelected(ParagraphFormat.Attribute)
Informs about whether an attribute from the ParagraphFormat.Attribute enumeration has the same value for the complete selection.
public bool IsCommonValueSelected(ParagraphFormat.Attribute attribute);Public Function IsCommonValueSelected(attribute As ParagraphFormat.Attribute) As Boolean| Parameter | Description |
|---|---|
| attribute | Specifies a possible value from the enumeration. |
IsCommonValueSelected(ListFormat.Attribute)
Informs about whether an attribute from the ListFormat.Attribute enumeration has the same value for the complete selection.
public bool IsCommonValueSelected(ListFormat.Attribute attribute);Public Function IsCommonValueSelected(attribute As ListFormat.Attribute) As Boolean| Parameter | Description |
|---|---|
| attribute | Specifies a possible value from the enumeration. |
IsCommonValueSelected(SectionFormat.Attribute)
Informs about whether an attribute from the SectionFormat.Attribute enumeration has the same value for the complete selection.
public bool IsCommonValueSelected(SectionFormat.Attribute attribute);Public Function IsCommonValueSelected(attribute As SectionFormat.Attribute) As Boolean| Parameter | Description |
|---|---|
| attribute | Specifies a possible value from the enumeration. |
IsCommonValueSelected(PageMargins.Attribute)
Informs about whether an attribute from the PageMargins.Attribute enumeration has the same value for the complete selection.
public bool IsCommonValueSelected(PageMargins.Attribute attribute);Public Function IsCommonValueSelected(attribute As PageMargins.Attribute) As Boolean| Parameter | Description |
|---|---|
| attribute | Specifies a possible value from the enumeration. |
IsCommonValueSelected(PageSize.Attribute)
Informs about whether an attribute from the PageSize.Attribute enumeration has the same value for the complete selection.
public bool IsCommonValueSelected(PageSize.Attribute attribute);Public Function IsCommonValueSelected(attribute As PageSize.Attribute) As Boolean| Parameter | Description |
|---|---|
| attribute | Specifies a possible value from the enumeration. |
IsCommonValueSelected(PageBorder.Attribute)
Informs about whether an attribute from the PageBorder.Attribute enumeration has the same value for the complete selection.
public bool IsCommonValueSelected(PageBorder.Attribute attribute);Public Function IsCommonValueSelected(attribute As PageBorder.Attribute) As Boolean| Parameter | Description |
|---|---|
| attribute | Specifies a possible value from the enumeration. |
Return Value
The return value is true if the complete selection is formatted with the same value of the specified attribute. Otherwise it is false.
Examples
The following example formats the heading of a short document by using Selection.IsCommonValueSelected.
textControl.Text = "Quarterly results\nRevenue increased by 12%.";
textControl.Select(0, 17);
Selection selection = textControl.Selection;
if (selection.IsCommonValueSelected(Selection.Attribute.Baseline))
{
Console.WriteLine("Is Common Value Selected completed successfully.");
}textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."
textControl.Select(0, 17)
Dim selection As Selection = textControl.Selection
If selection.IsCommonValueSelected(Selection.Attribute.Baseline) Then
Console.WriteLine("Is Common Value Selected completed successfully.")
End If