|
6 | 6 | xmlns:local="clr-namespace:iNKORE.UI.WPF.Modern.Gallery" |
7 | 7 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
8 | 8 | xmlns:sys="clr-namespace:System;assembly=mscorlib" |
9 | | - xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" |
| 9 | + xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf" |
10 | 10 | Title="ScrollViewer Page" |
11 | 11 | d:DesignWidth="800" |
12 | 12 | mc:Ignorable="d" |
|
25 | 25 | Height="266" |
26 | 26 | HorizontalAlignment="Left" |
27 | 27 | VerticalAlignment="Top" |
| 28 | + IsScrollAnimationEnabled="{Binding ElementName=CheckBox_Example1_IsScrollAnimationEnabled, Path=IsChecked, Mode=OneWay}" |
28 | 29 | HorizontalScrollBarVisibility="{Binding ElementName=hsbvCombo, Path=SelectedItem.Content, Mode=OneWay}" |
29 | 30 | VerticalScrollBarVisibility="{Binding ElementName=vsbvCombo, Path=SelectedItem.Content, Mode=OneWay}" > |
30 | 31 | <Grid> |
31 | | - <Image |
32 | | - HorizontalAlignment="Center" |
33 | | - VerticalAlignment="Center" |
34 | | - AutomationProperties.Name="cliff" |
35 | | - Source="/Assets/SampleMedia/cliff.jpg" |
36 | | - Stretch="None" /> |
| 32 | + <Image Source="/Assets/SampleMedia/cliff.jpg" |
| 33 | + AutomationProperties.Name="cliff" Stretch="None" /> |
37 | 34 | </Grid> |
38 | 35 | </ui:ScrollViewerEx> |
39 | 36 |
|
40 | 37 | <local:ControlExample.Options> |
41 | | - <Grid MinWidth="200"> |
42 | | - <Grid.ColumnDefinitions> |
43 | | - <ColumnDefinition Width="Auto" /> |
44 | | - <ColumnDefinition /> |
45 | | - </Grid.ColumnDefinitions> |
46 | | - <Grid.RowDefinitions> |
47 | | - <RowDefinition Height="Auto"/> |
48 | | - <RowDefinition Height="Auto"/> |
49 | | - <RowDefinition Height="Auto"/> |
50 | | - <RowDefinition Height="Auto"/> |
51 | | - <RowDefinition Height="Auto"/> |
52 | | - <RowDefinition Height="Auto"/> |
53 | | - <RowDefinition Height="Auto"/> |
54 | | - <RowDefinition Height="Auto"/> |
55 | | - </Grid.RowDefinitions> |
| 38 | + <ikw:SimpleStackPanel MinWidth="200" Spacing="16"> |
| 39 | + <ikw:SimpleStackPanel> |
| 40 | + <CheckBox x:Name="CheckBox_Example1_IsScrollAnimationEnabled" Content="IsScrollAnimationEnabled" |
| 41 | + IsChecked="True" HorizontalAlignment="Stretch" Click="CheckBox_Example1_IsScrollAnimationEnabled_Click"/> |
| 42 | + </ikw:SimpleStackPanel> |
56 | 43 |
|
57 | | - <!-- ZoomMode |
| 44 | + <Grid> |
| 45 | + <Grid.ColumnDefinitions> |
| 46 | + <ColumnDefinition Width="Auto" /> |
| 47 | + <ColumnDefinition /> |
| 48 | + </Grid.ColumnDefinitions> |
| 49 | + <Grid.RowDefinitions> |
| 50 | + <RowDefinition Height="Auto"/> |
| 51 | + <RowDefinition Height="Auto"/> |
| 52 | + <RowDefinition Height="Auto"/> |
| 53 | + <RowDefinition Height="Auto"/> |
| 54 | + <RowDefinition Height="Auto"/> |
| 55 | + <RowDefinition Height="Auto"/> |
| 56 | + <RowDefinition Height="Auto"/> |
| 57 | + <RowDefinition Height="Auto"/> |
| 58 | + </Grid.RowDefinitions> |
| 59 | + |
| 60 | + <!-- ZoomMode |
58 | 61 | <TextBlock Grid.Row="0" VerticalAlignment="Center" Text="ZoomMode" /> |
59 | 62 | <ComboBox x:Name="cmbZoomMode" |
60 | 63 | Grid.Row="0" Grid.Column="1" |
|
63 | 66 | <ComboBoxItem>Enabled</ComboBoxItem> |
64 | 67 | <ComboBoxItem>Disabled</ComboBoxItem> |
65 | 68 | </ComboBox> --> |
66 | | - <!-- ZoomNumberBox |
| 69 | + <!-- ZoomNumberBox |
67 | 70 | <TextBlock Grid.Row="1" VerticalAlignment="Center" Text="ZoomFactor" Margin="0,8,0,0"/> |
68 | 71 | <ui:NumberBox x:Name="ZoomNumberBox" |
69 | 72 | Grid.Row="1" Grid.Column="1" |
|
76 | 79 | ValueChanged="ZoomNumberBox_ValueChanged" |
77 | 80 | Width="120" |
78 | 81 | Margin="0,8,0,0"/> --> |
79 | | - <!-- ScrollMode |
| 82 | + <!-- ScrollMode |
80 | 83 | <TextBlock Grid.Row="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Text="ScrollMode" Margin="0,8,0,0"/> |
81 | 84 | <TextBlock Grid.Row="3" VerticalAlignment="Center" Text="Horizontal" Margin="0,8,0,0"/> |
82 | 85 | <ComboBox x:Name="cmbHorizontalScrollMode" |
|
98 | 101 | <ComboBoxItem>Disabled</ComboBoxItem> |
99 | 102 | <ComboBoxItem>Auto</ComboBoxItem> |
100 | 103 | </ComboBox> --> |
101 | | - <TextBlock Grid.Row="5" Grid.ColumnSpan="2" HorizontalAlignment="Center" Text="ScrollbarVisibility" Margin="0,0,0,0" FontWeight="Bold"/> |
102 | | - <TextBlock Grid.Row="6" Margin="0,8,10,0" VerticalAlignment="Center" Text="Horizontal"/> |
103 | | - <ComboBox x:Name="hsbvCombo" |
| 104 | + <TextBlock Grid.Row="5" Grid.ColumnSpan="2" HorizontalAlignment="Center" Text="ScrollbarVisibility" Margin="0,0,0,8" FontWeight="Bold"/> |
| 105 | + <TextBlock Grid.Row="6" Margin="0,12,10,12" VerticalAlignment="Center" Text="Horizontal"/> |
| 106 | + <ComboBox x:Name="hsbvCombo" |
104 | 107 | Grid.Row="6" Grid.Column="1" |
105 | 108 | HorizontalAlignment="Stretch" |
106 | 109 | SelectedIndex="0" |
107 | 110 | SelectionChanged="hsbvCombo_SelectionChanged_1" |
108 | | - Margin="12,16,0,0"> |
109 | | - <ComboBoxItem Content="Auto"/> |
110 | | - <ComboBoxItem Content="Visible"/> |
111 | | - <ComboBoxItem Content="Hidden"/> |
112 | | - <ComboBoxItem Content="Disabled"/> |
113 | | - </ComboBox> |
114 | | - <TextBlock Grid.Row="7" Margin="0,8,10,0" VerticalAlignment="Center" Text="Vertical"/> |
115 | | - <ComboBox x:Name="vsbvCombo" |
| 111 | + Margin="0,0,0,0" VerticalAlignment="Center"> |
| 112 | + <ComboBoxItem Content="Auto"/> |
| 113 | + <ComboBoxItem Content="Visible"/> |
| 114 | + <ComboBoxItem Content="Hidden"/> |
| 115 | + <ComboBoxItem Content="Disabled"/> |
| 116 | + </ComboBox> |
| 117 | + <TextBlock Grid.Row="7" Margin="0,12,10,12" VerticalAlignment="Center" Text="Vertical"/> |
| 118 | + <ComboBox x:Name="vsbvCombo" |
116 | 119 | Grid.Row="7" Grid.Column="1" |
117 | | - Margin="12,16,0,0" |
| 120 | + Margin="0,0,0,0" |
118 | 121 | HorizontalAlignment="Stretch" |
119 | 122 | SelectionChanged="vsbvCombo_SelectionChanged_1" |
120 | | - SelectedIndex="0"> |
121 | | - <ComboBoxItem Content="Auto"/> |
122 | | - <ComboBoxItem Content="Visible"/> |
123 | | - <ComboBoxItem Content="Hidden"/> |
124 | | - <ComboBoxItem Content="Disabled"/> |
125 | | - </ComboBox> |
126 | | - </Grid> |
| 123 | + SelectedIndex="0" VerticalAlignment="Center"> |
| 124 | + <ComboBoxItem Content="Auto"/> |
| 125 | + <ComboBoxItem Content="Visible"/> |
| 126 | + <ComboBoxItem Content="Hidden"/> |
| 127 | + <ComboBoxItem Content="Disabled"/> |
| 128 | + </ComboBox> |
| 129 | + </Grid> |
| 130 | + </ikw:SimpleStackPanel> |
127 | 131 | </local:ControlExample.Options> |
128 | 132 | </local:ControlExample> |
129 | 133 | </StackPanel> |
|
0 commit comments