|
244 | 244 | </Trigger>
|
245 | 245 | </Style.Triggers>
|
246 | 246 | </Style>
|
| 247 | + |
| 248 | + <Style x:Key="TreeViewContainerStyle" TargetType="{x:Type TreeViewItem}"> |
| 249 | + <Setter Property="BorderThickness" Value="1.5"/> |
| 250 | + <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" /> |
| 251 | + <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=OneWay}" /> |
| 252 | + <Setter Property="Visibility" Value="{Binding Filtered, Mode=OneWay, Converter={StaticResource BoolToHiddenVisibility}}" /> |
| 253 | + <Setter Property="HorizontalAlignment" Value="Left" /> |
| 254 | + <EventSetter Event="MouseDoubleClick" Handler="TreeView_OnMouseDoubleClick" /> |
| 255 | + <EventSetter Event="MouseRightButtonDown" Handler="TreeView_OnMouseRightButtonDown" /> |
| 256 | + <Style.Triggers> |
| 257 | + <Trigger Property="IsSelected" Value="True"> |
| 258 | + <Setter Property="BorderBrush" Value="#adc6e5"/> |
| 259 | + </Trigger> |
| 260 | + <MultiTrigger> |
| 261 | + <MultiTrigger.Conditions> |
| 262 | + <Condition Property="IsSelected" Value="True"/> |
| 263 | + <Condition Property="IsSelectionActive" Value="False"/> |
| 264 | + </MultiTrigger.Conditions> |
| 265 | + <Setter Property="BorderBrush" Value="LightGray"/> |
| 266 | + </MultiTrigger> |
| 267 | + </Style.Triggers> |
| 268 | + <Style.Resources> |
| 269 | + <Style TargetType="Border"> |
| 270 | + <Setter Property="CornerRadius" Value="2"/> |
| 271 | + </Style> |
| 272 | + </Style.Resources> |
| 273 | + </Style> |
247 | 274 | </ResourceDictionary>
|
248 | 275 | </UserControl.Resources>
|
249 | 276 |
|
|
423 | 450 | Background="White"
|
424 | 451 | HorizontalContentAlignment="Stretch"
|
425 | 452 | ItemsSource="{Binding Projects}"
|
| 453 | + ItemContainerStyle="{StaticResource TreeViewContainerStyle}" |
426 | 454 | FontSize="{Binding FontSize, Mode=OneWay}"
|
427 | 455 | BorderThickness="0,1"
|
428 | 456 | VirtualizingPanel.IsVirtualizing="False">
|
|
533 | 561 | </ContextMenu>
|
534 | 562 | </TreeView.ContextMenu>
|
535 | 563 | <TreeView.ItemTemplate>
|
536 |
| - <HierarchicalDataTemplate DataType="codeExplorer:ICodeExplorerNode" ItemsSource="{Binding Children}"> |
537 |
| - <HierarchicalDataTemplate.ItemContainerStyle> |
538 |
| - <Style TargetType="{x:Type TreeViewItem}"> |
539 |
| - <Setter Property="BorderThickness" Value="1.5"/> |
540 |
| - <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" /> |
541 |
| - <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=OneWay}" /> |
542 |
| - <Setter Property="Visibility" Value="{Binding Filtered, Mode=OneWay, Converter={StaticResource BoolToHiddenVisibility}}" /> |
543 |
| - <Setter Property="HorizontalAlignment" Value="Left" /> |
544 |
| - <EventSetter Event="MouseDoubleClick" Handler="TreeView_OnMouseDoubleClick" /> |
545 |
| - <EventSetter Event="MouseRightButtonDown" Handler="TreeView_OnMouseRightButtonDown" /> |
546 |
| - <Style.Triggers> |
547 |
| - <Trigger Property="IsSelected" Value="True"> |
548 |
| - <Setter Property="BorderBrush" Value="#adc6e5"/> |
549 |
| - </Trigger> |
550 |
| - <MultiTrigger> |
551 |
| - <MultiTrigger.Conditions> |
552 |
| - <Condition Property="IsSelected" Value="True"/> |
553 |
| - <Condition Property="IsSelectionActive" Value="False"/> |
554 |
| - </MultiTrigger.Conditions> |
555 |
| - <Setter Property="BorderBrush" Value="LightGray"/> |
556 |
| - </MultiTrigger> |
557 |
| - </Style.Triggers> |
558 |
| - <Style.Resources> |
559 |
| - <Style TargetType="Border"> |
560 |
| - <Setter Property="CornerRadius" Value="2"/> |
561 |
| - </Style> |
562 |
| - </Style.Resources> |
563 |
| - </Style> |
564 |
| - </HierarchicalDataTemplate.ItemContainerStyle> |
| 564 | + <HierarchicalDataTemplate DataType="codeExplorer:ICodeExplorerNode" ItemsSource="{Binding Children}" ItemContainerStyle="{StaticResource TreeViewContainerStyle}"> |
565 | 565 | <HierarchicalDataTemplate.Resources>
|
566 | 566 | <Style x:Key="TreeViewItemStyle" TargetType="{x:Type TextBlock}">
|
567 | 567 | <Setter Property="Text" Value="{Binding Name}" />
|
|
0 commit comments