|
3 | 3 | <Window x:Uid="Window_1" x:Class="FileMetadataAssociationManager.ProfilesWindow" |
4 | 4 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
5 | 5 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 6 | + xmlns:l="clr-namespace:FileMetadataAssociationManager" |
6 | 7 | xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop" |
7 | 8 | Title="Custom Profile Definition" Height="800" Width="1000" FontSize="12" WindowStartupLocation="CenterOwner" |
8 | 9 | Loaded="Window_Loaded" Closing="Window_Closing"> |
|
37 | 38 | </DataTrigger> |
38 | 39 | </Style.Triggers> |
39 | 40 | </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> |
40 | 58 | </Window.Resources> |
41 | 59 | <Grid x:Uid="Grid_1"> |
42 | 60 | <Grid.ColumnDefinitions> |
|
95 | 113 | <Grid.RowDefinitions> |
96 | 114 | <RowDefinition x:Uid="RowDefinition_1" Height="30"/> |
97 | 115 | <RowDefinition x:Uid="RowDefinition_8" Height="1*"/> |
98 | | - <RowDefinition x:Uid="RowDefinition_9" Height="30"/> |
| 116 | + <RowDefinition x:Uid="RowDefinition_9" Height="Auto"/> |
99 | 117 | <RowDefinition x:Uid="RowDefinition_2" Height="4*"/> |
100 | 118 | </Grid.RowDefinitions> |
101 | 119 | <Label x:Uid="Label_5" Grid.Row="0" Content="Property Groups" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="12"/> |
|
107 | 125 | </DataTemplate> |
108 | 126 | </ListBox.ItemTemplate> |
109 | 127 | </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> |
113 | 148 | <TreeView.ItemTemplate> |
114 | 149 | <HierarchicalDataTemplate x:Uid="HierarchicalDataTemplate_1" ItemsSource="{Binding Path=Children}"> |
115 | 150 | <Grid x:Uid="Grid_7"> |
|
0 commit comments