VitNX_DockGroup.EnsureVisible Method
public void EnsureVisible()
This language is not supported or no code example is available.
public void EnsureVisible()
{
if (DockArea != VitNX_DockArea.Document)
return;
if (VisibleContent == null)
return;
var width = ClientRectangle.Width - Padding.Horizontal - _tabArea.DropdownRectangle.Width;
var offsetArea = new Rectangle(Padding.Left, 0, width, 0);
var tab = _tabs[VisibleContent];
if (tab.ClientRectangle.IsEmpty)
return;
if (RectangleToTabArea(tab.ClientRectangle).Left < offsetArea.Left)
_tabArea.Offset = tab.ClientRectangle.Left;
else if (RectangleToTabArea(tab.ClientRectangle).Right > offsetArea.Right)
_tabArea.Offset = tab.ClientRectangle.Right - width;
if (_tabArea.TotalTabSize < offsetArea.Width)
_tabArea.Offset = 0;
if (_tabArea.TotalTabSize > offsetArea.Width)
{
var orderedContent = _contents.OrderBy(x => x.Order);
var lastTab = _tabs[orderedContent.Last()];
if (lastTab != null)
{
if (RectangleToTabArea(lastTab.ClientRectangle).Right < offsetArea.Right)
_tabArea.Offset = lastTab.ClientRectangle.Right - width;
}
}
Invalidate();
}
This language is not supported or no code example is available.
.NET Framework
Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8
.NET Core
Supported in: 5.0+, 6.0+