[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.FormattingBag.SetFormatting

SetFormatting Method

SetFormatting(string, object, bool)

Sets the formatting property value.

Declaration
protected virtual void SetFormatting(string key, object value, bool tryRemoveInheritance = true)
Protected Overridable Sub SetFormatting(key As String, value As Object, Optional tryRemoveInheritance As Boolean = True)
Parameters
Type Name Description
string key

The short formatting property key to set value.

object value

The formatting property value.

bool tryRemoveInheritance

Whether to remove this instance inheritance and fix all inherited values as "direct" values.

SetFormatting<T>(string, object, T, bool)

Sets the formatting property value.

Declaration
protected void SetFormatting<T>(string key, object value, T defaultValue, bool tryRemoveInheritance = true)
Protected Sub SetFormatting(Of T)(key As String, value As Object, defaultValue As T, Optional tryRemoveInheritance As Boolean = True)
Parameters
Type Name Description
string key

The short formatting property key to set value.

object value

The formatting property value.

T defaultValue

The default value of the property.

bool tryRemoveInheritance

Whether to remove this instance inheritance and fix all inherited values as "direct" values.

Type Parameters
Name Description
T

A type of the value.

Remarks

If value equals default value then formatting will be removed.