# C1.Win.C1Editor.C1Editor.LoadDesignCSS

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_C1Editor_C1Editor_LoadDesignCSS_" data-uid="C1.Win.C1Editor.C1Editor.LoadDesignCSS*">LoadDesignCSS Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_C1Editor_C1Editor_LoadDesignCSS_" data-uid="C1.Win.C1Editor.C1Editor.LoadDesignCSS*"></a>
<h4 id="C1_Win_C1Editor_C1Editor_LoadDesignCSS_System_String_" data-uid="C1.Win.C1Editor.C1Editor.LoadDesignCSS(System.String)">LoadDesignCSS(string)</h4>
<div class="markdown level1 summary"><p>Loads a design CSS from a given file.
The base URL is inferred from the file location.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void LoadDesignCSS(string fileName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub LoadDesignCSS(fileName As String)</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.string">string</a></td>
      <td><span class="parametername">fileName</span></td>
      <td><p>The file from which the design CSS is loaded.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_C1Editor_C1Editor_LoadDesignCSS_" data-uid="C1.Win.C1Editor.C1Editor.LoadDesignCSS*"></a>
<h4 id="C1_Win_C1Editor_C1Editor_LoadDesignCSS_System_IO_Stream_" data-uid="C1.Win.C1Editor.C1Editor.LoadDesignCSS(System.IO.Stream)">LoadDesignCSS(Stream)</h4>
<div class="markdown level1 summary"><p>Loads a design CSS from a given stream.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void LoadDesignCSS(Stream stream)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub LoadDesignCSS(stream As Stream)</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.stream">Stream</a></td>
      <td><span class="parametername">stream</span></td>
      <td><p>The stream from which the design CSS is loaded.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_C1Editor_C1Editor_LoadDesignCSS_System_IO_Stream__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Base URL is not specified because this method only handles a simple, self-contained CSS.
The stream must be encoded in UTF-8.</p>
</div>
<h5 id="C1_Win_C1Editor_C1Editor_LoadDesignCSS_System_IO_Stream__examples">Examples</h5>
<p>string value = &quot;p {color:red;}&quot;;
Stream stream = new MemoryStream(Encoding.UTF8.GetBytes(value));
LoadDesignCSS(stream);</p>

</div>
