-
Notifications
You must be signed in to change notification settings - Fork 0
/
FileExplorer.xaml
33 lines (32 loc) · 1.93 KB
/
FileExplorer.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<UserControl x:Class="LungMorphApp.FileExplorer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:LungMorphApp"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300" Loaded="Initialization">
<UserControl.Resources>
</UserControl.Resources>
<Grid>
<TreeView x:Name="foldersItem" Width="Auto" Background="#FFFFFFFF" BorderBrush="#FFFFFFFF" Foreground="#FFFFFFFF"
SelectedItemChanged="FoldersItem_SelectedItemChanged">
<TreeView.Resources>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="HeaderTemplate">
<Setter.Value>
<DataTemplate>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Height="22">
<Image Name="img" Source="{Binding RelativeSource={RelativeSource Mode=FindAncestor,
AncestorType={x:Type TreeViewItem}}, Path=Header,
Converter={x:Static local:HeaderToImageConverter.Instance}}" />
<TextBlock Text="{Binding}" Margin="4,2" />
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</TreeView.Resources>
</TreeView>
</Grid>
</UserControl>