DotNet 4.8.1 build of DotNetBar
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using DevComponents.AdvTree;
|
||||
|
||||
namespace DevComponents.DotNetBar.Design
|
||||
{
|
||||
#region ColumnHeaderCollectionEditor
|
||||
/// <summary>
|
||||
/// Support for ColumnHeader tabs design-time editor.
|
||||
/// </summary>
|
||||
public class ColumnHeaderCollectionEditor : System.ComponentModel.Design.CollectionEditor
|
||||
{
|
||||
/// <summary>Creates new instance of the class</summary>
|
||||
/// <param name="type">Type to initialize editor with.</param>
|
||||
public ColumnHeaderCollectionEditor(Type type)
|
||||
: base(type)
|
||||
{
|
||||
}
|
||||
protected override Type CreateCollectionItemType()
|
||||
{
|
||||
return typeof(ColumnHeader);
|
||||
}
|
||||
protected override Type[] CreateNewItemTypes()
|
||||
{
|
||||
return new Type[] { typeof(ColumnHeader) };
|
||||
}
|
||||
protected override object CreateInstance(Type itemType)
|
||||
{
|
||||
object item = base.CreateInstance(itemType);
|
||||
if (item is ColumnHeader)
|
||||
{
|
||||
ColumnHeader ch = item as ColumnHeader;
|
||||
ch.Text = ch.Name;
|
||||
}
|
||||
return item;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
Reference in New Issue
Block a user