[]
        
(Showing Draft Content)

C1.Win.TouchToolKit.ControlBar.Content

Content Property

Content

Gets or sets a value indicating the C1.Win.TouchToolKit.ControlBar.UserControl type object for the ControlBar window.

Declaration
[TypeConverter(typeof(q))]
public Type Content { get; set; }
Property Value
Type Description
Type

A Type value indicating the C1.Win.TouchToolKit.ControlBar.UserControl object. The default is null.

Examples

The following code example shows how to use this property.

This code example is part of a larger example provided for the ControlBar class.

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);
	}
}
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
Exceptions
Type Condition
ArgumentException

The value should is a Type of C1.Win.TouchToolKit.ControlBar.UserControl.

ArgumentException

The C1.Win.TouchToolKit.ControlBar.UserControl should has a public constructor without parameters.