# C1.Win.TouchToolKit.ControlBar.Content

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_TouchToolKit_ControlBar_Content_" data-uid="C1.Win.TouchToolKit.ControlBar.Content*">Content Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_TouchToolKit_ControlBar_Content_" data-uid="C1.Win.TouchToolKit.ControlBar.Content*"></a>
<h4 id="C1_Win_TouchToolKit_ControlBar_Content" data-uid="C1.Win.TouchToolKit.ControlBar.Content">Content</h4>
<div class="markdown level1 summary"><p>Gets or sets a value indicating the <span class="xref">C1.Win.TouchToolKit.ControlBar.UserControl</span> type object for the <a class="xref" href="C1.Win.TouchToolKit.ControlBar.html">ControlBar</a> window.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[TypeConverter(typeof(l))]
public Type Content { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;TypeConverter(GetType(l))&gt;
Public Property Content As Type</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.type">Type</a></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a> value indicating the <span class="xref">C1.Win.TouchToolKit.ControlBar.UserControl</span> object. The default is null.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_TouchToolKit_ControlBar_Content_examples">Examples</h5>
<p>
  The following code example shows how to use this property. 
</p>
<p>
  This code example is part of a larger example provided for the <a class="xref" href="C1.Win.TouchToolKit.ControlBar.html">ControlBar</a> class.
</p>
<pre><code class="lang-csharp">public class ControlBarDemo : Form
{
	private MyUserControl _userControl = new MyUserControl();
	private GcZoom _gcZoom1 = new GcZoom();

	public ControlBarDemo()
	{
		_gcZoom1.Target = this;

		// Create ControlBar
		AddControlBar();
	}

	private void AddControlBar()
	{
		ControlBar controlBar = new ControlBar();

		// Content should is a Type of UserControl.
		controlBar.Content = _userControl.GetType();

		_gcZoom1.ControlBars.Add(controlBar);
	}
}</code></pre>
<pre><code class="lang-csharp">Public Class ControlBarDemo
	Inherits Form
	Private _userControl As New MyUserControl()
	Private _gcZoom1 As New GcZoom()

	Public Sub New()
		_gcZoom1.Target = Me

		' Create ControlBar
		AddControlBar()
	End Sub

	Private Sub AddControlBar()
		Dim controlBar As New ControlBar()

		' Content should is a Type of UserControl.
		controlBar.Content = _userControl.[GetType]()

		_gcZoom1.ControlBars.Add(controlBar)
	End Sub
End Class</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.argumentexception">ArgumentException</a></td>
      <td><p>The value should is a Type of <span class="xref">C1.Win.TouchToolKit.ControlBar.UserControl</span>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></td>
      <td><p>The <span class="xref">C1.Win.TouchToolKit.ControlBar.UserControl</span> should has a public constructor without parameters.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
