# C1.PivotEngine.PivotField.Style

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_PivotEngine_PivotField_Style_" data-uid="C1.PivotEngine.PivotField.Style*">Style Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_PivotEngine_PivotField_Style_" data-uid="C1.PivotEngine.PivotField.Style*"></a>
<h4 id="C1_PivotEngine_PivotField_Style" data-uid="C1.PivotEngine.PivotField.Style">Style</h4>
<div class="markdown level1 summary"><p>Gets the <a class="xref" href="C1.PivotEngine.PivotFieldStyle.html">PivotFieldStyle</a> used to display the field values on the grid.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public PivotFieldStyle Style { get; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public ReadOnly Property Style As PivotFieldStyle</code></pre>
</div>
<h5 id="C1_PivotEngine_PivotField_Style_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This property allows you to assign style properties to a specific <a class="xref" href="C1.PivotEngine.PivotField.html">PivotField</a>,
customizing the way the field values are displayed to the user.</p>
<p>Customizing the appearance of a field can be useful in views that contain
multiple value fields.</p>
<p>For example, the code below creates a view with two value fields and gives one
of the fields a green background:</p>
<pre><code class="lang-csharp">// create view
var fp = this.c1FlexPivotPage1.FlexPivotEngine;
fp.RowFields.Add("ProductName");
fp.ColumnFields.Add("Country");
fp.ValueFields.MaxItems = 2;
fp.ValueFields.Add("ExtendedPrice", "Freight");

// give the "ExtendedPrice" field a green background
var f = fp.Fields["ExtendedPrice"];
f.Style.BackColor = Color.FromArgb(240, 255, 240);</code></pre>
<p>You can also create conditional styles using the <a class="xref" href="C1.PivotEngine.PivotField.StyleHigh.html#C1_PivotEngine_PivotField_StyleHigh">StyleHigh</a>
and <a class="xref" href="C1.PivotEngine.PivotField.StyleLow.html#C1_PivotEngine_PivotField_StyleLow">StyleLow</a> properties.</p>
</div>
</div>
