private static int GetNextIndex(this GridSplitter gridSplitter, int index) { switch (gridSplitter.GetResizeBehavior()) { case GridResizeBehavior.PreviousAndCurrent: return(index); case GridResizeBehavior.PreviousAndNext: case GridResizeBehavior.CurrentAndNext: return(index + 1); case GridResizeBehavior.BasedOnAlignment: default: throw new NotSupportedException(); } }