[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.GcWordDocument.GetPropertyValueSource

GetPropertyValueSource Method

GetPropertyValueSource<T>(Expression<Func<T>>)

Gets the source of a formatting property.

This method finds and returns the object in the inheritance chain that determines the actual current value of the specified formatting property.

For example, to find the object that determines the font size of the first run in the document body:

var o = GetPropertyValueSource(() => document.Body.Runs.First.Font.Size);

In this example, if the Heading 1 style was applied to the paragraph containing that run, this method would return that style.

Declaration
public static object GetPropertyValueSource<T>(Expression<Func<T>> property)
Public Shared Function GetPropertyValueSource(Of T)([property] As Expression(Of Func(Of T))) As Object
Parameters
Type Name Description
Expression<Func<T>> property

An expression that returns a property derived from the FormattingBag class.

Returns
Type Description
object

If the property is inheritable, the object in the inheritance chain that explicitly specifies the property value, or null if the property value is not specified and the property has the default value.

If the property is not inheritable, the property owner is returned.

Type Parameters
Name Description
T