# GrapeCity.ActiveReports.Design.Designer.LockControls

## Content

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



<h1 id="GrapeCity_ActiveReports_Design_Designer_LockControls_" data-uid="GrapeCity.ActiveReports.Design.Designer.LockControls*">LockControls Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_Design_Designer_LockControls_" data-uid="GrapeCity.ActiveReports.Design.Designer.LockControls*"></a>
<h4 id="GrapeCity_ActiveReports_Design_Designer_LockControls" data-uid="GrapeCity.ActiveReports.Design.Designer.LockControls">LockControls</h4>
<div class="markdown level1 summary"><p>Gets or sets a value indicating whether the controls within the designer are locked, preventing modifications.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool LockControls { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</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.boolean">bool</a></td>
      <td><p><code>true</code> if the controls are locked and cannot be modified; otherwise, <code>false</code>. The default is <code>false</code>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_Design_Designer_LockControls_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>When set to <code>true</code>, this property prevents any modifications to the controls' properties, size, or position within the designer, effectively
making the design surface read-only. This is useful in scenarios where the design of the report is finalized and should not be altered.</p>
</div>
<h5 id="GrapeCity_ActiveReports_Design_Designer_LockControls_examples">Examples</h5>
<p>The sample below opens a Windows Form with the designer, featuring a pre-built report. Users can modify certain properties of existing controls,
but changing the report layout-specifically the position or size of report items-is not possible.</p>
<pre><code class="lang-csharp">class TweakSalesReportForm : Form
{
	public TweakSalesReportForm()
	{
		var designer = new Designer { Dock = DockStyle.Fill };
		var propertyGrid = new PropertyGrid() { Dock = DockStyle.Right };
		designer.LoadReport(new FileInfo("c:\\reports\\Sales.rdlx"));
		designer.PropertyGrid = propertyGrid;
		designer.LockControls = false;
		Controls.Add(designer);
		Contorls.Add(propertyGrid);
	}
}</code></pre>

</div>
