|
3 | 3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
4 | 4 | xmlns:ctl="using:InteractionControls">
|
5 | 5 |
|
6 |
| - <Style x:Key="DefaultZoomContentControlStyle" TargetType="ctl:ZoomContentControl"> |
7 |
| - <Setter Property="Template"> |
8 |
| - <Setter.Value> |
9 |
| - <ControlTemplate TargetType="ctl:ZoomContentControl"> |
10 |
| - <Grid> |
11 |
| - <Grid.RowDefinitions> |
12 |
| - <RowDefinition Height="*" /> |
13 |
| - <RowDefinition Height="Auto" /> |
14 |
| - </Grid.RowDefinitions> |
15 |
| - <Grid.ColumnDefinitions> |
16 |
| - <ColumnDefinition Width="*" /> |
17 |
| - <ColumnDefinition Width="Auto" /> |
18 |
| - </Grid.ColumnDefinitions> |
19 |
| - <Border |
| 6 | + <Style x:Key="DefaultZoomContentControlStyle" TargetType="ctl:ZoomContentControl"> |
| 7 | + <Setter Property="Template"> |
| 8 | + <Setter.Value> |
| 9 | + <ControlTemplate TargetType="ctl:ZoomContentControl"> |
| 10 | + <Grid> |
| 11 | + <Grid.RowDefinitions> |
| 12 | + <RowDefinition Height="*" /> |
| 13 | + <RowDefinition Height="Auto" /> |
| 14 | + </Grid.RowDefinitions> |
| 15 | + <Grid.ColumnDefinitions> |
| 16 | + <ColumnDefinition Width="*" /> |
| 17 | + <ColumnDefinition Width="Auto" /> |
| 18 | + </Grid.ColumnDefinitions> |
| 19 | + <Border |
20 | 20 | Grid.Row="0"
|
21 | 21 | Grid.Column="0"
|
22 | 22 | Background="{TemplateBinding Background}">
|
23 |
| - <ContentPresenter |
| 23 | + <ContentPresenter |
24 | 24 | x:Name="PART_Presenter"
|
25 | 25 | Margin="{TemplateBinding Padding}"
|
26 | 26 | HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
27 | 27 | VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
28 | 28 | Content="{TemplateBinding Content}"
|
29 | 29 | ContentTemplate="{TemplateBinding ContentTemplate}">
|
30 |
| - <ContentPresenter.RenderTransform> |
31 |
| - <TransformGroup> |
32 |
| - <ScaleTransform CenterX="{TemplateBinding HorizontalZoomCenter}" CenterY="{TemplateBinding VerticalZoomCenter}" ScaleX="{TemplateBinding ZoomLevel}" ScaleY="{TemplateBinding ZoomLevel}" /> |
33 |
| - <TranslateTransform X="{TemplateBinding HorizontalOffset}" Y="{TemplateBinding VerticalOffset}" /> |
34 |
| - </TransformGroup> |
35 |
| - </ContentPresenter.RenderTransform> |
36 |
| - </ContentPresenter> |
37 |
| - </Border> |
38 |
| - <!-- Vertical ScrollBar --> |
39 |
| - <ScrollBar |
| 30 | + <ContentPresenter.RenderTransform> |
| 31 | + <TransformGroup> |
| 32 | + <ScaleTransform CenterX="{TemplateBinding HorizontalZoomCenter}" CenterY="{TemplateBinding VerticalZoomCenter}" ScaleX="{TemplateBinding ZoomLevel}" ScaleY="{TemplateBinding ZoomLevel}" /> |
| 33 | + <TranslateTransform X="{TemplateBinding HorizontalOffset}" Y="{TemplateBinding VerticalOffset}" /> |
| 34 | + </TransformGroup> |
| 35 | + </ContentPresenter.RenderTransform> |
| 36 | + </ContentPresenter> |
| 37 | + </Border> |
| 38 | + <!-- Vertical ScrollBar --> |
| 39 | + <ScrollBar |
40 | 40 | x:Name="PART_scrollV"
|
41 | 41 | Grid.Row="0"
|
42 | 42 | Grid.Column="1"
|
43 | 43 | HorizontalAlignment="Right"
|
44 | 44 | VerticalAlignment="Stretch"
|
45 |
| - LargeChange="100" |
| 45 | + IndicatorMode="MouseIndicator" |
| 46 | + LargeChange="10" |
46 | 47 | Maximum="{TemplateBinding VerticalMaxScroll}"
|
47 | 48 | Minimum="{TemplateBinding VerticalMinScroll}"
|
48 | 49 | Orientation="Vertical"
|
49 |
| - SmallChange="10" |
50 |
| - ViewportSize="{TemplateBinding ViewPortHeight}" |
51 |
| - Value="{TemplateBinding VerticalOffset}" /> |
52 |
| - <!-- Horizontal ScrollBar --> |
53 |
| - <TextBlock |
54 |
| - HorizontalAlignment="Stretch" |
55 |
| - VerticalAlignment="Center" |
56 |
| - FontSize="16" |
57 |
| - Foreground="Red" |
58 |
| - Text="{Binding Value, ElementName=PART_scrollH}" /> |
59 |
| - <ScrollBar |
| 50 | + SmallChange="1" |
| 51 | + ViewportSize="{TemplateBinding ViewPortHeight}" /> |
| 52 | + <!-- Horizontal ScrollBar --> |
| 53 | + <ScrollBar |
60 | 54 | x:Name="PART_scrollH"
|
61 | 55 | Grid.Row="1"
|
62 | 56 | Grid.Column="0"
|
63 | 57 | HorizontalAlignment="Stretch"
|
64 | 58 | VerticalAlignment="Bottom"
|
65 | 59 | IndicatorMode="MouseIndicator"
|
66 |
| - LargeChange="100" |
| 60 | + LargeChange="10" |
67 | 61 | Maximum="{TemplateBinding HorizontalMaxScroll}"
|
68 | 62 | Minimum="{TemplateBinding HorizontalMinScroll}"
|
69 | 63 | Orientation="Horizontal"
|
70 |
| - SmallChange="10" |
71 |
| - ViewportSize="{TemplateBinding ViewPortWidth}" |
72 |
| - Value="{TemplateBinding HorizontalOffset}" /> |
73 |
| - </Grid> |
74 |
| - </ControlTemplate> |
75 |
| - </Setter.Value> |
76 |
| - </Setter> |
77 |
| - </Style> |
| 64 | + SmallChange="1" |
| 65 | + ViewportSize="{TemplateBinding ViewPortWidth}" /> |
| 66 | + </Grid> |
| 67 | + </ControlTemplate> |
| 68 | + </Setter.Value> |
| 69 | + </Setter> |
| 70 | + </Style> |
78 | 71 |
|
79 |
| - <Style TargetType="ctl:ZoomContentControl" BasedOn="{StaticResource DefaultZoomContentControlStyle}" /> |
| 72 | + <Style BasedOn="{StaticResource DefaultZoomContentControlStyle}" TargetType="ctl:ZoomContentControl" /> |
80 | 73 |
|
81 | 74 |
|
82 | 75 | </ResourceDictionary>
|
0 commit comments