Skip to content

Commit bace243

Browse files
committed
Add property search and display names (Issue #70)
1 parent d71ef9a commit bace243

13 files changed

+1312
-10
lines changed

AssociationManager/FileMetaAssociationManager.csproj

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@
121121
<Compile Include="Code Pack\ShellPropertyEnumType.cs" />
122122
<Compile Include="Code Pack\ShellPropertyFactory.cs" />
123123
<Compile Include="SavedState.cs" />
124+
<Compile Include="SearchTextBox\ListBoxEx.cs" />
125+
<Compile Include="SearchTextBox\SearchTextBox.cs" />
124126
<Compile Include="State.cs" />
125127
<Compile Include="TreeItem.cs" />
126128
<Page Include="HowTo.xaml">
@@ -144,6 +146,14 @@
144146
<DependentUpon>MainWindow.xaml</DependentUpon>
145147
<SubType>Code</SubType>
146148
</Compile>
149+
<Page Include="Themes\Generic.xaml">
150+
<Generator>MSBuild:Compile</Generator>
151+
<SubType>Designer</SubType>
152+
</Page>
153+
<Page Include="Themes\ListBoxEx.xaml">
154+
<Generator>MSBuild:Compile</Generator>
155+
<SubType>Designer</SubType>
156+
</Page>
147157
</ItemGroup>
148158
<ItemGroup>
149159
<Compile Include="Properties\AssemblyInfo.cs">
@@ -197,6 +207,15 @@
197207
<Name>GongSolutions.Wpf.DragDrop %28NET35%29</Name>
198208
</ProjectReference>
199209
</ItemGroup>
210+
<ItemGroup />
211+
<ItemGroup>
212+
<Resource Include="Resources\ic_add_black_18dp.png" />
213+
<Resource Include="Resources\ic_clear_black_18dp.png" />
214+
<Resource Include="Resources\ic_keyboard_arrow_down_black_18dp.png" />
215+
<Resource Include="Resources\ic_keyboard_arrow_up_black_18dp.png" />
216+
<Resource Include="Resources\ic_search_black_18dp.png" />
217+
<Resource Include="Resources\ic_unfold_more_black_18dp.png" />
218+
</ItemGroup>
200219
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
201220
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
202221
Other similar extension points exist, see Microsoft.Common.targets.

AssociationManager/ProfilesWindow.xaml

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<Window x:Uid="Window_1" x:Class="FileMetadataAssociationManager.ProfilesWindow"
44
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
55
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
6+
xmlns:l="clr-namespace:FileMetadataAssociationManager"
67
xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
78
Title="Custom Profile Definition" Height="800" Width="1000" FontSize="12" WindowStartupLocation="CenterOwner"
89
Loaded="Window_Loaded" Closing="Window_Closing">
@@ -37,6 +38,23 @@
3738
</DataTrigger>
3839
</Style.Triggers>
3940
</Style>
41+
<Style x:Key="SelectTreeViewItemStyle"
42+
TargetType="{x:Type TreeViewItem}">
43+
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
44+
<Setter Property="FontWeight" Value="Normal" />
45+
<Setter Property="ItemsPanel">
46+
<Setter.Value>
47+
<ItemsPanelTemplate>
48+
<l:MyVirtualizingStackPanel/>
49+
</ItemsPanelTemplate>
50+
</Setter.Value>
51+
</Setter>
52+
<Style.Triggers>
53+
<Trigger Property="IsSelected" Value="True">
54+
<Setter Property="FontWeight" Value="Bold" />
55+
</Trigger>
56+
</Style.Triggers>
57+
</Style>
4058
</Window.Resources>
4159
<Grid x:Uid="Grid_1">
4260
<Grid.ColumnDefinitions>
@@ -95,7 +113,7 @@
95113
<Grid.RowDefinitions>
96114
<RowDefinition x:Uid="RowDefinition_1" Height="30"/>
97115
<RowDefinition x:Uid="RowDefinition_8" Height="1*"/>
98-
<RowDefinition x:Uid="RowDefinition_9" Height="30"/>
116+
<RowDefinition x:Uid="RowDefinition_9" Height="Auto"/>
99117
<RowDefinition x:Uid="RowDefinition_2" Height="4*"/>
100118
</Grid.RowDefinitions>
101119
<Label x:Uid="Label_5" Grid.Row="0" Content="Property Groups" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="12"/>
@@ -107,9 +125,26 @@
107125
</DataTemplate>
108126
</ListBox.ItemTemplate>
109127
</ListBox>
110-
<Label x:Uid="Label_8" Grid.Row="2" Content="Properties" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="12"/>
111-
<TreeView x:Uid="treeAllProperties" Grid.Row="3" Margin="0,0,10,0" Name="treeAllProperties" ItemsSource="{Binding Path=AllProperties}" FontSize="12"
112-
dd:DragDrop.IsDragSource="True">
128+
<Grid Grid.Row="2" Margin="0,0,10,0">
129+
<Grid.ColumnDefinitions>
130+
<ColumnDefinition Width="Auto"/>
131+
<ColumnDefinition Width="*"/>
132+
</Grid.ColumnDefinitions>
133+
<Label x:Uid="Label_8" Grid.Column="0" Content="Properties" VerticalAlignment="Bottom" FontSize="12"/>
134+
<l:SearchTextBox Grid.Column="1" x:Name="searchTextBox" SectionsStyle="CheckBoxStyle"
135+
OnSearch="searchTextBox_OnSearch"/>
136+
</Grid>
137+
<TreeView x:Uid="treeAllProperties" Grid.Row="3" Margin="0,0,10,0" Name="treeAllProperties"
138+
VirtualizingStackPanel.IsVirtualizing="True"
139+
ItemsSource="{Binding Path=AllProperties}" FontSize="12"
140+
ItemContainerStyle="{StaticResource SelectTreeViewItemStyle}"
141+
dd:DragDrop.IsDragSource="True"
142+
SelectedItemChanged="treeAllProperties_SelectedItemChanged">
143+
<TreeView.ItemsPanel>
144+
<ItemsPanelTemplate>
145+
<l:MyVirtualizingStackPanel/>
146+
</ItemsPanelTemplate>
147+
</TreeView.ItemsPanel>
113148
<TreeView.ItemTemplate>
114149
<HierarchicalDataTemplate x:Uid="HierarchicalDataTemplate_1" ItemsSource="{Binding Path=Children}">
115150
<Grid x:Uid="Grid_7">

0 commit comments

Comments
 (0)