1212 x : Key =" WD.DefaultTreeView"
1313 BasedOn =" {StaticResource WD.ControlBasicStyle}"
1414 TargetType =" {x:Type TreeView}" >
15- <Setter Property =" ScrollViewer.HorizontalScrollBarVisibility" Value =" Auto" />
16- <Setter Property =" ScrollViewer.VerticalScrollBarVisibility" Value =" Auto" />
1715 <Setter Property =" BorderThickness" Value =" 1" />
1816 <Setter Property =" Background" Value =" {DynamicResource WD.BackgroundBrush}" />
1917 <Setter Property =" BorderBrush" Value =" {DynamicResource WD.BaseBrush}" />
2018 <Setter Property =" Padding" Value =" {StaticResource WD.Padding}" />
19+ <Setter Property =" ScrollViewer.HorizontalScrollBarVisibility" Value =" Auto" />
20+ <Setter Property =" ScrollViewer.VerticalScrollBarVisibility" Value =" Auto" />
21+ <Setter Property =" ScrollViewer.PanningMode" Value =" Both" />
22+ <Setter Property =" Stylus.IsFlicksEnabled" Value =" False" />
23+ <Setter Property =" VerticalContentAlignment" Value =" Center" />
2124 <Setter Property =" Template" >
2225 <Setter .Value>
23- <ControlTemplate TargetType =" TreeView" >
26+ <ControlTemplate TargetType =" {x:Type TreeView} " >
2427 <controls : WDBorder
2528 Padding =" {TemplateBinding Padding}"
2629 Background =" {TemplateBinding Background}"
2730 BorderBrush =" {TemplateBinding BorderBrush}"
2831 BorderThickness =" {TemplateBinding BorderThickness}"
2932 CornerRadius =" {Binding Path=(helpers:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
3033 SnapsToDevicePixels =" True" >
31- <ScrollViewer
32- CanContentScroll =" False"
34+ <controls : WDScrollViewer
35+ x : Name =" PART_ScrollViewer"
36+ Padding =" {TemplateBinding Padding}"
37+ Background =" {TemplateBinding Background}"
3338 Clip =" {Binding RelativeSource={RelativeSource AncestorType=controls:WDBorder}, Path=ContentClip}"
34- Focusable =" False" >
39+ Focusable =" False"
40+ HorizontalScrollBarVisibility =" {TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
41+ IsScrollAnimation =" {Binding Path=(helpers:TreeViewHelper.IsScrollAnimation), RelativeSource={RelativeSource TemplatedParent}}"
42+ SnapsToDevicePixels =" {TemplateBinding SnapsToDevicePixels}"
43+ VerticalScrollBarVisibility =" {TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" >
3544 <ItemsPresenter />
36- </ScrollViewer >
45+ </controls : WDScrollViewer >
3746 </controls : WDBorder >
3847 </ControlTemplate >
3948 </Setter .Value>
125134 BasedOn =" {StaticResource WD.ControlBasicStyle}"
126135 TargetType =" {x:Type TreeViewItem}" >
127136 <Setter Property =" Background" Value =" Transparent" />
128- <Setter Property =" HorizontalContentAlignment" Value =" {Binding Path= HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
129- <Setter Property =" VerticalContentAlignment" Value =" {Binding Path= VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
137+ <Setter Property =" HorizontalContentAlignment" Value =" {Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
138+ <Setter Property =" VerticalContentAlignment" Value =" {Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
130139 <Setter Property =" Padding" Value =" {Binding Padding, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ItemsControl}}}" />
131140 <Setter Property =" FocusVisualStyle" Value =" {StaticResource WD.TreeViewItemFocusVisual}" />
132- <Setter Property =" FontSize" Value =" {Binding RelativeSource={RelativeSource AncestorType=TreeView}, Path=FontSize}" />
133- <Setter Property =" FontWeight" Value =" {Binding RelativeSource={RelativeSource AncestorType=TreeView}, Path=FontWeight}" />
134- <Setter Property =" FontFamily" Value =" {Binding RelativeSource={RelativeSource AncestorType=TreeView}, Path=FontFamily}" />
135141 <Setter Property =" Template" >
136142 <Setter .Value>
137143 <ControlTemplate TargetType =" {x:Type TreeViewItem}" >
143149 </Grid .ColumnDefinitions>
144150 <Grid .RowDefinitions>
145151 <RowDefinition Height =" Auto" />
146- <RowDefinition Height = " Auto " />
152+ <RowDefinition />
147153 </Grid .RowDefinitions>
148154 <ToggleButton
149155 x : Name =" Expander"
150156 ClickMode =" Press"
151- IsChecked =" {Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}"
157+ IsChecked =" {Binding IsExpanded, RelativeSource={RelativeSource Mode= TemplatedParent}}"
152158 Style =" {StaticResource WD.ExpandCollapseToggleStyle}" />
153159 <Border
154160 x : Name =" PART_Border"
162168 <ContentPresenter
163169 x : Name =" PART_Header"
164170 HorizontalAlignment =" {TemplateBinding HorizontalContentAlignment}"
165- ContentSource =" Header" />
171+ ContentSource =" Header"
172+ SnapsToDevicePixels =" {TemplateBinding SnapsToDevicePixels}" />
166173 </Border >
167174 <Border
168175 x : Name =" PART_ItemsHost"
206213 <MultiTrigger >
207214 <MultiTrigger .Conditions>
208215 <Condition Property =" IsSelected" Value =" True" />
209- <Condition Property =" IsSelectionActive " Value =" False " />
216+ <Condition SourceName = " PART_Border " Property =" IsMouseOver " Value =" True " />
210217 </MultiTrigger .Conditions>
211- <Setter TargetName =" PART_Border" Property =" Background" Value =" {DynamicResource WD.BackgroundBrush }" />
218+ <Setter TargetName =" PART_Border" Property =" Background" Value =" {DynamicResource WD.BaseMoveBrush }" />
212219 </MultiTrigger >
213220 </ControlTemplate .Triggers>
214221 </ControlTemplate >
215222 </Setter .Value>
216223 </Setter >
217224 </Style >
225+
218226 <Style BasedOn =" {StaticResource WD.DefaultTreeView}" TargetType =" {x:Type TreeView}" />
219227 <Style BasedOn =" {StaticResource WD.DefaultTreeViewItem}" TargetType =" {x:Type TreeViewItem}" />
220228</ResourceDictionary >
0 commit comments