# GrapeCity.Documents.Word.GcWordDocument.GetPropertyValueSource

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Word_GcWordDocument_GetPropertyValueSource_" data-uid="GrapeCity.Documents.Word.GcWordDocument.GetPropertyValueSource*">GetPropertyValueSource Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Word_GcWordDocument_GetPropertyValueSource_" data-uid="GrapeCity.Documents.Word.GcWordDocument.GetPropertyValueSource*"></a>
<h4 id="GrapeCity_Documents_Word_GcWordDocument_GetPropertyValueSource__1_System_Linq_Expressions_Expression_System_Func___0___" data-uid="GrapeCity.Documents.Word.GcWordDocument.GetPropertyValueSource``1(System.Linq.Expressions.Expression{System.Func{``0}})">GetPropertyValueSource&lt;T&gt;(Expression&lt;Func&lt;T&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Gets the source of a formatting property.</p>
<p>
This method finds and returns the object in the inheritance chain that
determines the actual current value of the specified formatting property.
</p>
<p>
For example, to find the object that determines the font size of the first
run in the document body:
</p>
<pre><code class="lang-csharp">var o = GetPropertyValueSource(() =&gt; document.Body.Runs.First.Font.Size);</code></pre>
<p>
In this example, if the Heading 1 style was applied to the
paragraph containing that run, this method would return that style.
</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static object GetPropertyValueSource&lt;T&gt;(Expression&lt;Func&lt;T&gt;&gt; property)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function GetPropertyValueSource(Of T)([property] As Expression(Of Func(Of T))) As Object</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-1">Func</a>&lt;T&gt;&gt;</td>
      <td><span class="parametername">property</span></td>
      <td><p>An expression that returns a property derived from the <a class="xref" href="GrapeCity.Documents.Word.FormattingBag.html">FormattingBag</a> class.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><p>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.</p>
<p>If the property is not inheritable, the property owner is returned.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">T</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
