自动生成的通过了
自定义控件还是不行
public class CheckboxInputHost : C1.Win.C1InputPanel.InputControlHost
{
[Bindable(true)]
[Browsable(false)]
[C1CategoryAttribute("Data")]
[C1DescriptionAttribute("InputComponent.BoundValue", "Gets or sets the bound data value associated with this component.")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public override object BoundValue
{
get
{
return Checkbox.Value;
}
set
{
Checkbox.Value = value;
}
}
public C1CheckBox Checkbox { get; private set; }
public CheckboxInputHost() : base(new C1CheckBox())
{
Checkbox = (this.Control as C1CheckBox);
Checkbox.AutoSize = false;
Checkbox.TabStop = true;
Checkbox.ValueChanged+= (a, b) =>
{
foreach (Binding item in DataBindings)
{
if (item.PropertyName == "BoundValue")
{
item.WriteValue();
}
}
};
}
} |