Merge branch 'master' into add-RelativePanel

This commit is contained in:
NaBian committed 2019-12-01 21:50:10 +08:00
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;
@@ -910,10 +910,4 @@
<Folder Include="$(MSBuildThisFileDirectory)Controls\Growl\" />
<Folder Include="$(MSBuildThisFileDirectory)Tools\Generator\" />
</ItemGroup>
<ItemGroup>
<Page Update="E:\Work\GitHub\HandyControl\src\Shared\HandyControl_Shared\Themes\Styles\Base\SplitButtonBaseStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
</Project>