# GrapeCity.ActiveReports.Rdl.Themes.XmlThemeReader.ReadTheme

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_ActiveReports_Rdl_Themes_XmlThemeReader_ReadTheme_" data-uid="GrapeCity.ActiveReports.Rdl.Themes.XmlThemeReader.ReadTheme*">ReadTheme Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_Rdl_Themes_XmlThemeReader_ReadTheme_" data-uid="GrapeCity.ActiveReports.Rdl.Themes.XmlThemeReader.ReadTheme*"></a>
<h4 id="GrapeCity_ActiveReports_Rdl_Themes_XmlThemeReader_ReadTheme_System_IO_FileInfo_" data-uid="GrapeCity.ActiveReports.Rdl.Themes.XmlThemeReader.ReadTheme(System.IO.FileInfo)">ReadTheme(FileInfo)</h4>
<div class="markdown level1 summary"><p>Reads a theme from the specified file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Theme ReadTheme(FileInfo themefileInfo)</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.io.fileinfo">FileInfo</a></td>
      <td><span class="parametername">themefileInfo</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.fileinfo">FileInfo</a> object representing the file that contains the theme.</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="GrapeCity.ActiveReports.Rdl.Themes.Theme.html">Theme</a></td>
      <td><p>A <a class="xref" href="GrapeCity.ActiveReports.Rdl.Themes.Theme.html">Theme</a> object representing the parsed theme.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_Rdl_Themes_XmlThemeReader_ReadTheme_System_IO_FileInfo__examples">Examples</h5>
<pre><code class="lang-csharp">var themeFileInfo = new FileInfo("path/to/theme.rdlx-theme");
var theme = XmlThemeReader.ReadTheme(themeFileInfo);</code></pre>

<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.filenotfoundexception">FileNotFoundException</a></td>
      <td><p>Thrown if the specified file does not exist.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.ioexception">IOException</a></td>
      <td><p>Thrown if an I/O error occurs while opening the file.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
