using System.Drawing; using System.Windows.Forms; using Elfisa.UI.Theming; namespace Elfisa.UI.Controls { public class ModernSplitContainer : SplitContainer { public ModernSplitContainer() { SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true); BorderStyle = BorderStyle.None; SplitterWidth = 6; IsSplitterFixed = false; FixedPanel = FixedPanel.None; } public void ApplyTheme(ThemeColors theme) { BackColor = theme.Mode == ThemeMode.Dark ? theme.Border : theme.Border; Panel1.BackColor = theme.BackgroundPrimary; Panel2.BackColor = theme.BackgroundPrimary; Invalidate(true); } } }