fixed #900
This commit is contained in:
1 parent
07e7fb1296
commit
b525a2ffcc
1 file changed
+5
-13
@@ -110,7 +110,7 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
|
|
||||||
_transform.X = p.X - _previewContent.ActualWidth * 0.5;
|
_transform.X = p.X - _previewContent.ActualWidth * 0.5;
|
||||||
_transform.Y = -_previewContent.ActualHeight - PreviewContentOffset;
|
_transform.Y = _thumb.TranslatePoint(new Point(), _adorner).Y - _previewContent.ActualHeight - PreviewContentOffset;
|
||||||
|
|
||||||
PreviewPosition = _thumb.IsMouseCaptureWithin ? Value : pos;
|
PreviewPosition = _thumb.IsMouseCaptureWithin ? Value : pos;
|
||||||
}
|
}
|
||||||
@@ -128,7 +128,7 @@ namespace HandyControl.Controls
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_transform.X = -_previewContent.ActualWidth - PreviewContentOffset;
|
_transform.X = _thumb.TranslatePoint(new Point(), _adorner).X -_previewContent.ActualWidth - PreviewContentOffset;
|
||||||
_transform.Y = p.Y - _previewContent.ActualHeight * 0.5;
|
_transform.Y = p.Y - _previewContent.ActualHeight * 0.5;
|
||||||
|
|
||||||
PreviewPosition = _thumb.IsMouseCaptureWithin ? Value : pos;
|
PreviewPosition = _thumb.IsMouseCaptureWithin ? Value : pos;
|
||||||
@@ -194,18 +194,10 @@ namespace HandyControl.Controls
|
|||||||
if (_previewContent != null)
|
if (_previewContent != null)
|
||||||
{
|
{
|
||||||
_transform = new TranslateTransform();
|
_transform = new TranslateTransform();
|
||||||
_previewContent.RenderTransform = _transform;
|
|
||||||
|
|
||||||
if (Orientation == Orientation.Horizontal)
|
_previewContent.HorizontalAlignment = HorizontalAlignment.Left;
|
||||||
{
|
_previewContent.VerticalAlignment = VerticalAlignment.Top;
|
||||||
_previewContent.HorizontalAlignment = HorizontalAlignment.Left;
|
_previewContent.RenderTransform = _transform;
|
||||||
_previewContent.VerticalAlignment = VerticalAlignment.Center;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_previewContent.HorizontalAlignment = HorizontalAlignment.Center;
|
|
||||||
_previewContent.VerticalAlignment = VerticalAlignment.Top;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user