Adding Controls to the Toolbox

If the newly referenced assembly contains any controls, they will automatically show up in the toolbox unless they have the [Browsable(false)] attribute specified.

You can specify which category heading any control should be shown under by using the attributes highlighted in the example below. You can also specify which heading a control's properties should appear under.

using System.ComponentModel;

[DisplayName("Masked Text Box")]
[DesignerCategory("Common Controls")]
[Description("The Masked TextBox.")]
public partial class MaskedTextBox : UserControl
{
  public static readonly DependencyProperty MaskProperty =
  DependencyProperty.Register("Mask", typeof(MaskString), typeof(MaskedTextBox),
    new FrameworkPropertyMetadata(new MaskString("AAA"),
new PropertyChangedCallback(OnMaskPropertyChanged)));

  [EditorBrowsable(EditorBrowsableState.Always), Category("Validation"), Description("The mask which will determine whether 
the data entry is valid")]
  public MaskString Mask
  {
    get { return (MaskString)GetValue(MaskProperty) as MaskString; }
    set { SetValue(MaskProperty, value); }