Skip to content

Commit

Permalink
Add property search and display names (Issue #70)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dijji committed Nov 8, 2019
1 parent d71ef9a commit bace243
Show file tree
Hide file tree
Showing 13 changed files with 1,312 additions and 10 deletions.
19 changes: 19 additions & 0 deletions AssociationManager/FileMetaAssociationManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@
<Compile Include="Code Pack\ShellPropertyEnumType.cs" />
<Compile Include="Code Pack\ShellPropertyFactory.cs" />
<Compile Include="SavedState.cs" />
<Compile Include="SearchTextBox\ListBoxEx.cs" />
<Compile Include="SearchTextBox\SearchTextBox.cs" />
<Compile Include="State.cs" />
<Compile Include="TreeItem.cs" />
<Page Include="HowTo.xaml">
Expand All @@ -144,6 +146,14 @@
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="Themes\Generic.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\ListBoxEx.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
Expand Down Expand Up @@ -197,6 +207,15 @@
<Name>GongSolutions.Wpf.DragDrop %28NET35%29</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Resource Include="Resources\ic_add_black_18dp.png" />
<Resource Include="Resources\ic_clear_black_18dp.png" />
<Resource Include="Resources\ic_keyboard_arrow_down_black_18dp.png" />
<Resource Include="Resources\ic_keyboard_arrow_up_black_18dp.png" />
<Resource Include="Resources\ic_search_black_18dp.png" />
<Resource Include="Resources\ic_unfold_more_black_18dp.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
43 changes: 39 additions & 4 deletions AssociationManager/ProfilesWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<Window x:Uid="Window_1" x:Class="FileMetadataAssociationManager.ProfilesWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:l="clr-namespace:FileMetadataAssociationManager"
xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
Title="Custom Profile Definition" Height="800" Width="1000" FontSize="12" WindowStartupLocation="CenterOwner"
Loaded="Window_Loaded" Closing="Window_Closing">
Expand Down Expand Up @@ -37,6 +38,23 @@
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="SelectTreeViewItemStyle"
TargetType="{x:Type TreeViewItem}">
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<l:MyVirtualizingStackPanel/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="FontWeight" Value="Bold" />
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid x:Uid="Grid_1">
<Grid.ColumnDefinitions>
Expand Down Expand Up @@ -95,7 +113,7 @@
<Grid.RowDefinitions>
<RowDefinition x:Uid="RowDefinition_1" Height="30"/>
<RowDefinition x:Uid="RowDefinition_8" Height="1*"/>
<RowDefinition x:Uid="RowDefinition_9" Height="30"/>
<RowDefinition x:Uid="RowDefinition_9" Height="Auto"/>
<RowDefinition x:Uid="RowDefinition_2" Height="4*"/>
</Grid.RowDefinitions>
<Label x:Uid="Label_5" Grid.Row="0" Content="Property Groups" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="12"/>
Expand All @@ -107,9 +125,26 @@
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Label x:Uid="Label_8" Grid.Row="2" Content="Properties" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="12"/>
<TreeView x:Uid="treeAllProperties" Grid.Row="3" Margin="0,0,10,0" Name="treeAllProperties" ItemsSource="{Binding Path=AllProperties}" FontSize="12"
dd:DragDrop.IsDragSource="True">
<Grid Grid.Row="2" Margin="0,0,10,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Label x:Uid="Label_8" Grid.Column="0" Content="Properties" VerticalAlignment="Bottom" FontSize="12"/>
<l:SearchTextBox Grid.Column="1" x:Name="searchTextBox" SectionsStyle="CheckBoxStyle"
OnSearch="searchTextBox_OnSearch"/>
</Grid>
<TreeView x:Uid="treeAllProperties" Grid.Row="3" Margin="0,0,10,0" Name="treeAllProperties"
VirtualizingStackPanel.IsVirtualizing="True"
ItemsSource="{Binding Path=AllProperties}" FontSize="12"
ItemContainerStyle="{StaticResource SelectTreeViewItemStyle}"
dd:DragDrop.IsDragSource="True"
SelectedItemChanged="treeAllProperties_SelectedItemChanged">
<TreeView.ItemsPanel>
<ItemsPanelTemplate>
<l:MyVirtualizingStackPanel/>
</ItemsPanelTemplate>
</TreeView.ItemsPanel>
<TreeView.ItemTemplate>
<HierarchicalDataTemplate x:Uid="HierarchicalDataTemplate_1" ItemsSource="{Binding Path=Children}">
<Grid x:Uid="Grid_7">
Expand Down
Loading

0 comments on commit bace243

Please sign in to comment.