// *********************************************************************** // Assembly : Construction // Author : flythink // Created : 06-29-2020 // // Last Modified By : flythink // Last Modified On : 09-01-2020 // *********************************************************************** // // Copyright (c) jindongfang. All rights reserved. // // // *********************************************************************** namespace WellWorkDataUI.CustomControls { using DevExpress.Utils.DPI; using DevExpress.XtraEditors; using DevExpress.XtraEditors.Drawing; using System; using System.ComponentModel; /// /// Class CustomSplitContainerControl. /// Implements the /// /// public class CustomSplitContainerControl : SplitContainerControl { private ScaleHelper helper; /// /// Initializes a new instance of the class. /// public CustomSplitContainerControl() { this.helper = ScaleHelper.CreateScaleHelperByDPI(this); } /// /// Gets or sets the size of the splitter. /// /// The size of the splitter. [Browsable(false)] public int SplitterSize { get; set; } = 3; /// /// Gets the size of the scale splitter. /// /// The size of the scale splitter. internal int ScaleSplitterSize => Convert.ToInt32(this.SplitterSize * this.helper.ScaleFactorVert); /// /// Creates the container information. /// /// SplitContainerViewInfo. protected override SplitContainerViewInfo CreateContainerInfo() { return new CustomSplitContainerViewInfo(this); } /// /// Class CustomSplitContainerViewInfo. /// Implements the /// /// public class CustomSplitContainerViewInfo : SplitContainerViewInfo { private CustomSplitContainerControl owner; /// /// Initializes a new instance of the class. /// /// The container. public CustomSplitContainerViewInfo(CustomSplitContainerControl container) : base(container) { this.owner = container; } /// protected override int GetSplitterSize() { return this.owner.ScaleSplitterSize; } } } }