Merge branch 'master' into add-RelativePanel
This commit is contained in:
commit
33ff9658cb
14 files changed
+428
-17
No files matched your search
@@ -636,6 +636,22 @@ namespace HandyControl.Controls
|
||||
}
|
||||
else if (ContextMenu != null)
|
||||
{
|
||||
if (ContextMenu.Items.Count == 0) return;
|
||||
|
||||
ContextMenu.InvalidateProperty(StyleProperty);
|
||||
foreach (var item in ContextMenu.Items)
|
||||
{
|
||||
if (item is MenuItem menuItem)
|
||||
{
|
||||
menuItem.InvalidateProperty(StyleProperty);
|
||||
}
|
||||
else
|
||||
{
|
||||
var container = ContextMenu.ItemContainerGenerator.ContainerFromItem(item) as MenuItem;
|
||||
container?.InvalidateProperty(StyleProperty);
|
||||
}
|
||||
}
|
||||
|
||||
ContextMenu.Placement = PlacementMode.Mouse;
|
||||
ContextMenu.IsOpen = true;
|
||||
|
||||
|
||||
@@ -304,7 +304,7 @@ namespace HandyControl.Controls
|
||||
ItemIsDragging = true;
|
||||
_isWaiting = true;
|
||||
_dragPoint = e.GetPosition(parent);
|
||||
_dragPoint = new Point(_dragPoint.X + +_scrollHorizontalOffset, _dragPoint.Y);
|
||||
_dragPoint = new Point(_dragPoint.X + _scrollHorizontalOffset, _dragPoint.Y);
|
||||
_mouseDownPoint = _dragPoint;
|
||||
CaptureMouse();
|
||||
}
|
||||
@@ -432,6 +432,11 @@ namespace HandyControl.Controls
|
||||
/// <returns></returns>
|
||||
private int CalLocationIndex(double left)
|
||||
{
|
||||
if (_isWaiting)
|
||||
{
|
||||
return CurrentIndex;
|
||||
}
|
||||
|
||||
var maxIndex = TabControlParent.Items.Count - 1;
|
||||
var div = (int)(left / ItemWidth);
|
||||
var rest = left % ItemWidth;
|
||||
|
||||
Reference in new issue
Block a user