private void CalculateRegion()
{
if (SameAsOldValue)
return;
if (!FloatWindowBounds.IsEmpty)
this.SetOutline(FloatWindowBounds);
else if (DockTo is DockPanel)
this.SetOutline(DockTo as DockPanel, Dock, (ContentIndex != 0));
else if (DockTo is DockPane)
this.SetOutline(DockTo as DockPane, Dock, ContentIndex);
else
this.SetOutline();
}