void UpdateScrollBars() { if (editor == null) { return; } editor.ApplyTemplate(); var scrollViewer = editor.ScrollViewer; if (scrollViewer == null) { return; } bool updating1 = engineScrollBarVertical.MouseUpDownStatus; //&& engineScrollBar1.MouseScrollBarArea == EnhancedScrollBarMouseLocation.Thumb; if (!updating1) { engineScrollBarVertical.Maximum = (int)scrollViewer.ScrollableHeight; engineScrollBarVertical.SmallChange = 30; engineScrollBarVertical.LargeChange = Height; engineScrollBarVertical.Value = (int)scrollViewer.VerticalOffset; } bool updating2 = engineScrollBarHorizontal.MouseUpDownStatus; //&& engineScrollBar2.MouseScrollBarArea == EnhancedScrollBarMouseLocation.Thumb; if (!updating2) { engineScrollBarHorizontal.Maximum = (int)scrollViewer.ScrollableWidth; engineScrollBarHorizontal.SmallChange = 30; engineScrollBarHorizontal.LargeChange = Height; engineScrollBarHorizontal.Value = (int)scrollViewer.HorizontalOffset; } //!!!!workaround kryptonSplitContainer.Panel2Collapsed = Editor.WordWrap; //kryptonSplitContainer.Panel2Collapsed = scrollViewer.ScrollableWidth == 0; kryptonSplitContainerSub1.Panel2Collapsed = scrollViewer.ScrollableHeight == 0; kryptonSplitContainerSub2.Panel2Collapsed = scrollViewer.ScrollableHeight == 0; }