fixed #900
This commit is contained in:
1 parent
77f273f6ae
commit
18092f004e
3 files changed
+17
-8
No files matched your search
@@ -110,7 +110,7 @@ namespace HandyControl.Controls
|
||||
}
|
||||
|
||||
_transform.X = p.X - _previewContent.ActualWidth * 0.5;
|
||||
_transform.Y = TranslatePoint(new Point(), _adorner).Y - _previewContent.ActualHeight - PreviewContentOffset;
|
||||
_transform.Y = -_previewContent.ActualHeight - PreviewContentOffset;
|
||||
|
||||
PreviewPosition = _thumb.IsMouseCaptureWithin ? Value : pos;
|
||||
}
|
||||
@@ -128,7 +128,7 @@ namespace HandyControl.Controls
|
||||
return;
|
||||
}
|
||||
|
||||
_transform.X = TranslatePoint(new Point(), _adorner).X - _previewContent.ActualWidth - PreviewContentOffset;
|
||||
_transform.X = -_previewContent.ActualWidth - PreviewContentOffset;
|
||||
_transform.Y = p.Y - _previewContent.ActualHeight * 0.5;
|
||||
|
||||
PreviewPosition = _thumb.IsMouseCaptureWithin ? Value : pos;
|
||||
@@ -195,8 +195,17 @@ namespace HandyControl.Controls
|
||||
{
|
||||
_transform = new TranslateTransform();
|
||||
_previewContent.RenderTransform = _transform;
|
||||
_previewContent.HorizontalAlignment = HorizontalAlignment.Left;
|
||||
_previewContent.VerticalAlignment = VerticalAlignment.Top;
|
||||
|
||||
if (Orientation == Orientation.Horizontal)
|
||||
{
|
||||
_previewContent.HorizontalAlignment = HorizontalAlignment.Left;
|
||||
_previewContent.VerticalAlignment = VerticalAlignment.Center;
|
||||
}
|
||||
else
|
||||
{
|
||||
_previewContent.HorizontalAlignment = HorizontalAlignment.Center;
|
||||
_previewContent.VerticalAlignment = VerticalAlignment.Top;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -624,7 +624,7 @@
|
||||
<ControlTemplate x:Key="PreviewSliderHorizontal" TargetType="hc:PreviewSlider">
|
||||
<hc:SimplePanel>
|
||||
<Border x:Name="TrackBackground" Background="{TemplateBinding Background}" Height="2" VerticalAlignment="center" Margin="9,0"/>
|
||||
<Track Margin="9,0" x:Name="PART_Track">
|
||||
<Track VerticalAlignment="center" Margin="9,0" x:Name="PART_Track">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Command="{x:Static Slider.DecreaseLarge}" Background="{DynamicResource PrimaryBrush}" Style="{StaticResource PreviewSliderRepeatButtonHorizontalStyle}"/>
|
||||
</Track.DecreaseRepeatButton>
|
||||
@@ -641,7 +641,7 @@
|
||||
<ControlTemplate x:Key="PreviewSliderVertical" TargetType="hc:PreviewSlider">
|
||||
<hc:SimplePanel>
|
||||
<Border x:Name="TrackBackground" Background="{TemplateBinding Background}" Width="2" HorizontalAlignment="center" Margin="0,9"/>
|
||||
<Track Margin="0,9" x:Name="PART_Track">
|
||||
<Track HorizontalAlignment="center" Margin="0,9" x:Name="PART_Track">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Command="{x:Static Slider.DecreaseLarge}" Background="{DynamicResource PrimaryBrush}" Style="{StaticResource PreviewSliderRepeatButtonVerticalStyle}"/>
|
||||
</Track.DecreaseRepeatButton>
|
||||
|
||||
@@ -1602,7 +1602,7 @@
|
||||
<ControlTemplate x:Key="PreviewSliderHorizontal" TargetType="hc:PreviewSlider">
|
||||
<hc:SimplePanel>
|
||||
<Border x:Name="TrackBackground" Background="{TemplateBinding Background}" Height="2" VerticalAlignment="center" Margin="9,0" />
|
||||
<Track Margin="9,0" x:Name="PART_Track">
|
||||
<Track VerticalAlignment="center" Margin="9,0" x:Name="PART_Track">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Command="{x:Static Slider.DecreaseLarge}" Background="{DynamicResource PrimaryBrush}" Style="{StaticResource PreviewSliderRepeatButtonHorizontalStyle}" />
|
||||
</Track.DecreaseRepeatButton>
|
||||
@@ -1618,7 +1618,7 @@
|
||||
<ControlTemplate x:Key="PreviewSliderVertical" TargetType="hc:PreviewSlider">
|
||||
<hc:SimplePanel>
|
||||
<Border x:Name="TrackBackground" Background="{TemplateBinding Background}" Width="2" HorizontalAlignment="center" Margin="0,9" />
|
||||
<Track Margin="0,9" x:Name="PART_Track">
|
||||
<Track HorizontalAlignment="center" Margin="0,9" x:Name="PART_Track">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Command="{x:Static Slider.DecreaseLarge}" Background="{DynamicResource PrimaryBrush}" Style="{StaticResource PreviewSliderRepeatButtonVerticalStyle}" />
|
||||
</Track.DecreaseRepeatButton>
|
||||
|
||||
Reference in new issue
Block a user