We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a879ebc commit 2aff85cCopy full SHA for 2aff85c
src/Shared/HandyControl_Shared/Controls/TabControl/TabItem.cs
@@ -225,7 +225,11 @@ public ContextMenu Menu
225
/// <param name="oldIndex"></param>
226
private void UpdateItemOffsetX(int oldIndex)
227
{
228
- if (!_isDragging) return;
+ if (!_isDragging || CurrentIndex >= TabPanel.ItemDic.Count)
229
+ {
230
+ return;
231
+ }
232
+
233
var moveItem = TabPanel.ItemDic[CurrentIndex];
234
moveItem.CurrentIndex -= CurrentIndex - oldIndex;
235
var offsetX = moveItem.TargetOffsetX;
0 commit comments