void ISplitterDragSource.MoveSplitter(int offset)
{
Rectangle rectDockArea = this.DockPanel.DockArea;
IDockContent content = this.ActiveContent;
if (this.DockState == DockState.DockLeftAutoHide && rectDockArea.Width > 0)
{
if (content.DockHandler.AutoHidePortion < 1)
content.DockHandler.AutoHidePortion += (offset) / (double)rectDockArea.Width;
else
content.DockHandler.AutoHidePortion = Width + offset;
}
else if (this.DockState == DockState.DockRightAutoHide && rectDockArea.Width > 0)
{
if (content.DockHandler.AutoHidePortion < 1)
content.DockHandler.AutoHidePortion -= (offset) / (double)rectDockArea.Width;
else
content.DockHandler.AutoHidePortion = Width - offset;
}
else if (this.DockState == DockState.DockBottomAutoHide && rectDockArea.Height > 0)
{
if (content.DockHandler.AutoHidePortion < 1)
content.DockHandler.AutoHidePortion -= (offset) / (double)rectDockArea.Height;
else
content.DockHandler.AutoHidePortion = Height - offset;
}
else if (this.DockState == DockState.DockTopAutoHide && rectDockArea.Height > 0)
{
if (content.DockHandler.AutoHidePortion < 1)
content.DockHandler.AutoHidePortion += (offset) / (double)rectDockArea.Height;
else
content.DockHandler.AutoHidePortion = Height + offset;
}
}