public TrackBarEditorElement(TrackBarEditor editor) { this.CanFocus = true; this.editor = editor; this.Maximum = 100; this.TickStyle = TickStyles.Both; this.SmallTickFrequency = 5; this.LargeTickFrequency = 20; this.BodyElement.ScaleContainerElement.TopScaleElement.StretchVertically = true; this.BodyElement.ScaleContainerElement.BottomScaleElement.StretchVertically = true; this.StretchVertically = false; }
/// <summary> /// Creates the control that is used in AdvPropertyGrid to edit property value. /// </summary> public override IPropertyValueEditor CreateEditor(PropertyDescriptor propertyDescriptor, object targetObject) { // We use custom control that implements IPropertyValueEditor interface TrackBarEditor editor = new TrackBarEditor(); editor.Minimum = Minimum; editor.Maximum = Maximum; editor.TickStyle = TickStyle.None; editor.AutoSize = false; editor.Height = 20; return(editor); }