Document Solutions for Word
DS.Documents.Word Assembly / GrapeCity.Documents.Word Namespace / GcWordDocument Class / GetPropertyValueSource<T> Method
An expression that returns a property derived from the FormattingBag class.

In This Topic
    GetPropertyValueSource<T> Method
    In This Topic
    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.

    Syntax
    'Declaration
     
    Public Shared Function GetPropertyValueSource(Of T)( _
       ByVal property As System.Linq.Expressions.Expression(Of Func(Of T)) _
    ) As System.Object
    public static System.object GetPropertyValueSource<T>( 
       System.Linq.Expressions.Expression<Func<T>> property
    )

    Parameters

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

    Type Parameters

    T

    Return Value

    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.

    See Also