Class TableConditionalFormattingStyle
Represents the special formatting applied to specified areas of a table TableAdv.
Inherited Members
Namespace: Syncfusion.UI.Xaml.RichTextBoxAdv
Assembly: Syncfusion.SfRichTextBoxAdv.UWP.dll
Syntax
public class TableConditionalFormattingStyle : TableStyle
Constructors
TableConditionalFormattingStyle()
Initializes a new instance of the TableConditionalFormattingStyle class.
Declaration
public TableConditionalFormattingStyle()
Examples
The following code example demonstrates, how to create a conditional formatting style.
TableStyle tableStyle = new TableStyle(richtextbox.Document);
tableStyle.Name = "MyStyle";
//Create heading row conditional style
TableConditionalFormattingStyle tableConditionalFormattingStyle = new TableConditionalFormattingStyle(richtextbox.Document);
//Create table conditional formatting style for first row
tableConditionalFormattingStyle.TableConditionalFormattingType = TableConditionalFormattingType.FirstRow;
//Set cell format property
tableConditionalFormattingStyle.CellFormat.Shading.BackgroundColor = Colors.LightBlue;
//Set character format property
tableConditionalFormattingStyle.CharacterFormat.Bold = true;
tableConditionalFormattingStyle.CharacterFormat.Underline = Syncfusion.Windows.Controls.RichTextBoxAdv.Underline.Dash;
//Set paragraph format property
tableConditionalFormattingStyle.ParagraphFormat.TextAlignment = TextAlignment.Right;
//Add the first row conditional style in table conditional formatting style collection
tableStyle.TableConditionalFormattingStyles.Add(tableConditionalFormattingStyle);
//Add the table style in document styles collection
richtextbox.Document.Styles.Add(tableStyle);
Private Sub SurroundingSub()
Dim tableStyle As TableStyle = New TableStyle(richtextbox.Document)
tableStyle.Name = "MyStyle"
Dim tableConditionalFormattingStyle As TableConditionalFormattingStyle = New TableConditionalFormattingStyle(richtextbox.Document)
tableConditionalFormattingStyle.TableConditionalFormattingType = TableConditionalFormattingType.FirstRow
tableConditionalFormattingStyle.CellFormat.Shading.BackgroundColor = Colors.LightBlue
tableConditionalFormattingStyle.CharacterFormat.Bold = True
tableConditionalFormattingStyle.CharacterFormat.Underline = Syncfusion.Windows.Controls.RichTextBoxAdv.Underline.Dash
tableConditionalFormattingStyle.ParagraphFormat.TextAlignment = TextAlignment.Right
tableStyle.TableConditionalFormattingStyles.Add(tableConditionalFormattingStyle)
richtextbox.Document.Styles.Add(tableStyle)
End Sub
TableConditionalFormattingStyle(DocumentAdv)
Initializes a new instance of the TableConditionalFormattingStyle class for the specified DocumentAdv.
Declaration
public TableConditionalFormattingStyle(DocumentAdv documentAdv)
Parameters
Type | Name | Description |
---|---|---|
DocumentAdv | documentAdv | The DocumentAdv to which the TableConditionalFormattingStyle is associated. |
Examples
The following code example demonstrates, how to create a conditional formatting style with the document it is associated with.
TableStyle tableStyle = new TableStyle(richtextbox.Document);
tableStyle.Name = "MyStyle";
//Create heading row conditional style
TableConditionalFormattingStyle tableConditionalFormattingStyle = new TableConditionalFormattingStyle(richtextbox.Document);
//Create table conditional formatting style for first row
tableConditionalFormattingStyle.TableConditionalFormattingType = TableConditionalFormattingType.FirstRow;
//Set cell format property
tableConditionalFormattingStyle.CellFormat.Shading.BackgroundColor = Colors.LightBlue;
//Set character format property
tableConditionalFormattingStyle.CharacterFormat.Bold = true;
tableConditionalFormattingStyle.CharacterFormat.Underline = Syncfusion.Windows.Controls.RichTextBoxAdv.Underline.Dash;
//Set paragraph format property
tableConditionalFormattingStyle.ParagraphFormat.TextAlignment = TextAlignment.Right;
//Add the first row conditional style in table conditional formatting style collection
tableStyle.TableConditionalFormattingStyles.Add(tableConditionalFormattingStyle);
//Add the table style in document styles collection
richtextbox.Document.Styles.Add(tableStyle);
Private Sub SurroundingSub()
Dim tableStyle As TableStyle = New TableStyle(richtextbox.Document)
tableStyle.Name = "MyStyle"
Dim tableConditionalFormattingStyle As TableConditionalFormattingStyle = New TableConditionalFormattingStyle(richtextbox.Document)
tableConditionalFormattingStyle.TableConditionalFormattingType = TableConditionalFormattingType.FirstRow
tableConditionalFormattingStyle.CellFormat.Shading.BackgroundColor = Colors.LightBlue
tableConditionalFormattingStyle.CharacterFormat.Bold = True
tableConditionalFormattingStyle.CharacterFormat.Underline = Syncfusion.Windows.Controls.RichTextBoxAdv.Underline.Dash
tableConditionalFormattingStyle.ParagraphFormat.TextAlignment = TextAlignment.Right
tableStyle.TableConditionalFormattingStyles.Add(tableConditionalFormattingStyle)
richtextbox.Document.Styles.Add(tableStyle)
End Sub
Properties
TableConditionalFormattingType
Gets or sets the area of a table in which to apply special style formatting.
Declaration
public TableConditionalFormattingType TableConditionalFormattingType { get; set; }
Property Value
Type | Description |
---|---|
TableConditionalFormattingType | The TableConditionalFormattingType represents the area of a table in which to apply special style formatting TableConditionalFormattingStyle. |
Examples
The following code example demonstrates, how to create a conditional formatting style with specific conditional formatting type.
TableStyle tableStyle = new TableStyle(richtextbox.Document);
tableStyle.Name = "MyStyle";
//Create heading row conditional style
TableConditionalFormattingStyle tableConditionalFormattingStyle = new TableConditionalFormattingStyle(richtextbox.Document);
//Create table conditional formatting style for first row
tableConditionalFormattingStyle.TableConditionalFormattingType = TableConditionalFormattingType.FirstRow;
//Set cell format property
tableConditionalFormattingStyle.CellFormat.Shading.BackgroundColor = Colors.LightBlue;
//Set character format property
tableConditionalFormattingStyle.CharacterFormat.Bold = true;
tableConditionalFormattingStyle.CharacterFormat.Underline = Syncfusion.Windows.Controls.RichTextBoxAdv.Underline.Dash;
//Set paragraph format property
tableConditionalFormattingStyle.ParagraphFormat.TextAlignment = TextAlignment.Right;
//Add the first row conditional style in table conditional formatting style collection
tableStyle.TableConditionalFormattingStyles.Add(tableConditionalFormattingStyle);
//Add the table style in document styles collection
richtextbox.Document.Styles.Add(tableStyle);
Private Sub SurroundingSub()
Dim tableStyle As TableStyle = New TableStyle(richtextbox.Document)
tableStyle.Name = "MyStyle"
Dim tableConditionalFormattingStyle As TableConditionalFormattingStyle = New TableConditionalFormattingStyle(richtextbox.Document)
tableConditionalFormattingStyle.TableConditionalFormattingType = TableConditionalFormattingType.FirstRow
tableConditionalFormattingStyle.CellFormat.Shading.BackgroundColor = Colors.LightBlue
tableConditionalFormattingStyle.CharacterFormat.Bold = True
tableConditionalFormattingStyle.CharacterFormat.Underline = Syncfusion.Windows.Controls.RichTextBoxAdv.Underline.Dash
tableConditionalFormattingStyle.ParagraphFormat.TextAlignment = TextAlignment.Right
tableStyle.TableConditionalFormattingStyles.Add(tableConditionalFormattingStyle)
richtextbox.Document.Styles.Add(tableStyle)
End Sub