mirror of
https://gitee.com/handyorg/HandyControl.git
synced 2024-12-02 20:07:56 +08:00
fixed #900
This commit is contained in:
parent
07e7fb1296
commit
b525a2ffcc
@ -110,7 +110,7 @@ namespace HandyControl.Controls
|
||||
}
|
||||
|
||||
_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;
|
||||
}
|
||||
@ -128,7 +128,7 @@ namespace HandyControl.Controls
|
||||
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;
|
||||
|
||||
PreviewPosition = _thumb.IsMouseCaptureWithin ? Value : pos;
|
||||
@ -194,18 +194,10 @@ namespace HandyControl.Controls
|
||||
if (_previewContent != null)
|
||||
{
|
||||
_transform = new TranslateTransform();
|
||||
_previewContent.RenderTransform = _transform;
|
||||
|
||||
if (Orientation == Orientation.Horizontal)
|
||||
{
|
||||
_previewContent.HorizontalAlignment = HorizontalAlignment.Left;
|
||||
_previewContent.VerticalAlignment = VerticalAlignment.Center;
|
||||
}
|
||||
else
|
||||
{
|
||||
_previewContent.HorizontalAlignment = HorizontalAlignment.Center;
|
||||
_previewContent.VerticalAlignment = VerticalAlignment.Top;
|
||||
}
|
||||
_previewContent.HorizontalAlignment = HorizontalAlignment.Left;
|
||||
_previewContent.VerticalAlignment = VerticalAlignment.Top;
|
||||
_previewContent.RenderTransform = _transform;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user