|
20 | 20 | <moc:EnumToMaterialIconConverter x:Key="EnumToMaterialIconConverter"/>
|
21 | 21 | </UserControl.Resources>
|
22 | 22 |
|
23 |
| - <Border BorderThickness="0" Margin="2"> |
24 |
| - <DockPanel Margin="2" > |
25 |
| - <TabStrip DockPanel.Dock="Top" Margin="2" SelectedIndex="{Binding SelectedTabIndex}" HorizontalAlignment="Center" Name="LocalOnlineTab"> |
26 |
| - <TabItem> |
27 |
| - <TabItem.Header> |
28 |
| - <DockPanel> |
29 |
| - <materialIcons:MaterialIcon Kind="DesktopClassic" Width="24" Height="24" Margin="2" /> |
30 |
| - <TextBlock HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="4" Text="Local" /> |
31 |
| - </DockPanel> |
32 |
| - </TabItem.Header> |
33 |
| - </TabItem> |
34 |
| - <TabItem> |
35 |
| - <TabItem.Header> |
36 |
| - <DockPanel> |
37 |
| - <materialIcons:MaterialIcon Kind="Web" Width="24" Height="24" Margin="2" /> |
38 |
| - <TextBlock HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="4" Text="Online" /> |
39 |
| - </DockPanel> |
40 |
| - </TabItem.Header> |
41 |
| - </TabItem> |
42 |
| - </TabStrip> |
43 |
| - |
44 |
| - <Grid Margin="8" Background="{DynamicResource ExpanderHeaderBackground}"> |
45 |
| - <Grid.RowDefinitions> |
46 |
| - <RowDefinition Height="Auto"/> |
47 |
| - <RowDefinition Height="Auto"/> |
48 |
| - <RowDefinition Height="Auto"/> |
49 |
| - <RowDefinition Height="Auto"/> |
50 |
| - <RowDefinition Height="Auto"/> |
51 |
| - <RowDefinition Height="*"/> |
52 |
| - </Grid.RowDefinitions> |
53 |
| - <DockPanel Grid.Row="0"> |
54 |
| - <Button Command="{Binding OpenCurrentFolder}" DockPanel.Dock="Right" MaxWidth="47" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="2" Padding="2" ToolTip.Tip="Open folder"> |
| 23 | + <DockPanel > |
| 24 | + <TabStrip DockPanel.Dock="Top" Margin="2" SelectedIndex="{Binding SelectedTabIndex}" HorizontalAlignment="Center" Name="LocalOnlineTab"> |
| 25 | + <TabItem> |
| 26 | + <TabItem.Header> |
| 27 | + <DockPanel> |
| 28 | + <materialIcons:MaterialIcon Kind="DesktopClassic" Width="24" Height="24" Margin="2" /> |
| 29 | + <TextBlock HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="4" Text="Local" /> |
| 30 | + </DockPanel> |
| 31 | + </TabItem.Header> |
| 32 | + </TabItem> |
| 33 | + <TabItem> |
| 34 | + <TabItem.Header> |
| 35 | + <DockPanel> |
| 36 | + <materialIcons:MaterialIcon Kind="Web" Width="24" Height="24" Margin="2" /> |
| 37 | + <TextBlock HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="4" Text="Online" /> |
| 38 | + </DockPanel> |
| 39 | + </TabItem.Header> |
| 40 | + </TabItem> |
| 41 | + </TabStrip> |
| 42 | + <Grid Background="{DynamicResource ExpanderHeaderBackground}"> |
| 43 | + <Grid.RowDefinitions> |
| 44 | + <RowDefinition Height="Auto"/> |
| 45 | + <RowDefinition Height="Auto"/> |
| 46 | + <RowDefinition Height="Auto"/> |
| 47 | + <RowDefinition Height="Auto"/> |
| 48 | + <RowDefinition Height="*"/> |
| 49 | + </Grid.RowDefinitions> |
| 50 | + <Border Grid.Row="0" BorderThickness="1"> |
| 51 | + <DockPanel> |
| 52 | + <Button Command="{Binding OpenCurrentFolder}" BorderThickness="0" DockPanel.Dock="Right" MinWidth="48" MaxWidth="48" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="2" Padding="2" ToolTip.Tip="Open folder"> |
55 | 53 | <materialIcons:MaterialIcon Kind="FolderOpen" Width="24" Height="24" Margin="2" />
|
56 | 54 | </Button>
|
57 |
| - <TextBox Text="{Binding CurrentDirectory}" DockPanel.Dock="Right" Watermark="Current directory" UseFloatingWatermark="True" IsReadOnly="True" VerticalContentAlignment="Center" Margin="2"/> |
| 55 | + <TextBox Text="{Binding CurrentDirectory}" BorderThickness="0" DockPanel.Dock="Right" Watermark="Current directory" UseFloatingWatermark="True" IsReadOnly="True" VerticalContentAlignment="Center" Margin="2"/> |
58 | 56 | </DockPanel>
|
59 |
| - <TextBox Grid.Row="1" Text="{Binding DirectoryFileCount}" Watermark="Objects in current directory" UseFloatingWatermark="True" IsReadOnly="True" Margin="2"/> |
60 |
| - <Button Grid.Row="2" Command="{Binding RefreshDirectoryItems}" HorizontalAlignment="Stretch" Margin="2" Padding="2" ToolTip.Tip="Recreate index"> |
61 |
| - <DockPanel> |
62 |
| - <ProgressBar DockPanel.Dock="Bottom" Minimum="0" Maximum="1" Margin="4" Height="8" Value="{Binding IndexOrDownloadProgress}"/> |
63 |
| - <materialIcons:MaterialIcon Kind="DatabaseRefresh" Width="24" Height="24" Margin="2" /> |
64 |
| - <TextBlock HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="4" Text="{Binding RecreateText}" /> |
65 |
| - </DockPanel> |
66 |
| - </Button> |
67 |
| - <DockPanel Grid.Row="3" Margin="2" > |
68 |
| - <materialIcons:MaterialIcon Kind="Magnify" Width="24" Height="24" Margin="2"/> |
69 |
| - <TextBox Text="{Binding FilenameFilter}" Watermark="Filename filter" /> |
| 57 | + </Border> |
| 58 | + <Border Grid.Row="1" BorderThickness="1"> |
| 59 | + <DockPanel> |
| 60 | + <Button Command="{Binding RefreshDirectoryItems}" BorderThickness="0" DockPanel.Dock="Right" MinWidth="48" MaxWidth="48" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="2" Padding="2" ToolTip.Tip="{Binding RecreateText}"> |
| 61 | + <DockPanel> |
| 62 | + <ProgressBar DockPanel.Dock="Bottom" Minimum="0" Maximum="1" Margin="4" Height="8" Value="{Binding IndexOrDownloadProgress}"/> |
| 63 | + <materialIcons:MaterialIcon Kind="DatabaseRefresh" Width="24" Height="24" Margin="2" /> |
| 64 | + </DockPanel> |
| 65 | + </Button> |
| 66 | + <TextBox Text="{Binding DirectoryFileCount}" BorderThickness="0" DockPanel.Dock="Right" Watermark="Objects in current directory" UseFloatingWatermark="True" IsReadOnly="True" VerticalContentAlignment="Center" Margin="2"/> |
70 | 67 | </DockPanel>
|
71 |
| - <Border Grid.Row="4" BorderThickness="1" Margin="2"> |
72 |
| - <Grid> |
73 |
| - <Grid.ColumnDefinitions> |
74 |
| - <ColumnDefinition Width="*"/> |
75 |
| - <ColumnDefinition Width="*"/> |
76 |
| - <ColumnDefinition Width="*"/> |
77 |
| - </Grid.ColumnDefinitions> |
78 |
| - <RadioButton Grid.Column="0" HorizontalAlignment="Center" GroupName="DisplayModeGroup" Content="Vanilla" IsChecked="{Binding DisplayMode, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static vm:ObjectDisplayMode.Vanilla}}"/> |
79 |
| - <RadioButton Grid.Column="1" HorizontalAlignment="Center" GroupName="DisplayModeGroup" Content="Custom" IsChecked="{Binding DisplayMode, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static vm:ObjectDisplayMode.Custom}}"/> |
80 |
| - <RadioButton Grid.Column="2" HorizontalAlignment="Center" GroupName="DisplayModeGroup" Content="All" IsChecked="{Binding DisplayMode, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static vm:ObjectDisplayMode.All}}"/> |
81 |
| - </Grid> |
82 |
| - </Border> |
83 |
| - <Border Grid.Row="5" BorderThickness="1" Margin="2"> |
84 |
| - <TreeDataGrid Source="{Binding TreeDataGridSource}"> |
85 |
| - <TreeDataGrid.Styles> |
86 |
| - <Style Selector="TreeDataGrid TreeDataGridRow"> |
87 |
| - <Setter Property="Height" Value="32"/> |
88 |
| - </Style> |
89 |
| - <Style Selector="TreeDataGrid TreeDataGridRow:nth-child(even)"> |
90 |
| - <Setter Property="Background" Value="#18808080"/> |
91 |
| - <!-- ARGB in hex --> |
92 |
| - </Style> |
93 |
| - </TreeDataGrid.Styles> |
94 |
| - <TreeDataGrid.Resources> |
95 |
| - |
96 |
| - <!-- Template for Name column cells --> |
97 |
| - <!-- Copied from App.axaml Window.DataTemplates as you cannot give a key there --> |
98 |
| - <DataTemplate x:Key="Object" DataType="mo:FileSystemItem"> |
99 |
| - <StackPanel Orientation="Horizontal" > |
100 |
| - <materialIcons:MaterialIcon Kind="{Binding DisplayName, Converter={StaticResource EnumToMaterialIconConverter}}" Width="24" Height="24" Margin="2"/> |
101 |
| - <TextBlock VerticalAlignment="Center" Text="{Binding NameComputed}"/> |
102 |
| - <StackPanel.ContextMenu> |
103 |
| - <ContextMenu IsVisible="{Binding IsLeafNode}"> |
104 |
| - <MenuItem Header="Open folder" Command="{Binding $parent[TreeDataGrid].((vm:FolderTreeViewModel)DataContext).OpenFolderFor}" CommandParameter="{Binding}" /> |
105 |
| - </ContextMenu> |
106 |
| - </StackPanel.ContextMenu> |
107 |
| - </StackPanel> |
108 |
| - </DataTemplate> |
109 |
| - |
110 |
| - <!-- Edit template for Name column cells --> |
111 |
| - <DataTemplate x:Key="Edit" DataType="mo:FileSystemItem"> |
112 |
| - <StackPanel Orientation="Horizontal" > |
113 |
| - <materialIcons:MaterialIcon Kind="{Binding DisplayName, Converter={StaticResource EnumToMaterialIconConverter}}" Width="24" Height="24" Margin="2" /> |
114 |
| - <TextBlock VerticalAlignment="Center" Text="{Binding NameComputed}"/> |
115 |
| - <StackPanel.ContextMenu> |
116 |
| - <ContextMenu IsVisible="{Binding IsLeafNode}"> |
117 |
| - <MenuItem Header="Open folder" Command="{Binding $parent[TreeDataGrid].((vm:FolderTreeViewModel)DataContext).OpenFolderFor}" CommandParameter="{Binding}" /> |
118 |
| - </ContextMenu> |
119 |
| - </StackPanel.ContextMenu> |
120 |
| - </StackPanel> |
121 |
| - </DataTemplate> |
122 |
| - |
123 |
| - </TreeDataGrid.Resources> |
124 |
| - </TreeDataGrid> |
125 |
| - </Border> |
126 |
| - </Grid> |
127 |
| - </DockPanel> |
128 |
| - </Border> |
| 68 | + </Border> |
| 69 | + <DockPanel Grid.Row="2"> |
| 70 | + <materialIcons:MaterialIcon Kind="Magnify" Width="24" Height="24" Margin="2"/> |
| 71 | + <TextBox Text="{Binding FilenameFilter}" Watermark="Filename filter" /> |
| 72 | + </DockPanel> |
| 73 | + <Border Grid.Row="3" BorderThickness="1"> |
| 74 | + <Grid> |
| 75 | + <Grid.ColumnDefinitions> |
| 76 | + <ColumnDefinition Width="*"/> |
| 77 | + <ColumnDefinition Width="*"/> |
| 78 | + <ColumnDefinition Width="*"/> |
| 79 | + </Grid.ColumnDefinitions> |
| 80 | + <RadioButton Grid.Column="0" HorizontalAlignment="Center" GroupName="DisplayModeGroup" Content="Vanilla" IsChecked="{Binding DisplayMode, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static vm:ObjectDisplayMode.Vanilla}}"/> |
| 81 | + <RadioButton Grid.Column="1" HorizontalAlignment="Center" GroupName="DisplayModeGroup" Content="Custom" IsChecked="{Binding DisplayMode, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static vm:ObjectDisplayMode.Custom}}"/> |
| 82 | + <RadioButton Grid.Column="2" HorizontalAlignment="Center" GroupName="DisplayModeGroup" Content="All" IsChecked="{Binding DisplayMode, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static vm:ObjectDisplayMode.All}}"/> |
| 83 | + </Grid> |
| 84 | + </Border> |
| 85 | + <Border Grid.Row="4" BorderThickness="1"> |
| 86 | + <TreeDataGrid Source="{Binding TreeDataGridSource}"> |
| 87 | + <TreeDataGrid.Styles> |
| 88 | + <Style Selector="TreeDataGrid TreeDataGridRow"> |
| 89 | + <Setter Property="Height" Value="32"/> |
| 90 | + </Style> |
| 91 | + <Style Selector="TreeDataGrid TreeDataGridRow:nth-child(even)"> |
| 92 | + <Setter Property="Background" Value="#18808080"/> |
| 93 | + <!-- ARGB in hex --> |
| 94 | + </Style> |
| 95 | + </TreeDataGrid.Styles> |
| 96 | + <TreeDataGrid.Resources> |
| 97 | + <!-- Template for Name column cells --> |
| 98 | + <!-- Copied from App.axaml Window.DataTemplates as you cannot give a key there --> |
| 99 | + <DataTemplate x:Key="Object" DataType="mo:FileSystemItem"> |
| 100 | + <StackPanel Orientation="Horizontal" > |
| 101 | + <materialIcons:MaterialIcon Kind="{Binding DisplayName, Converter={StaticResource EnumToMaterialIconConverter}}" Width="24" Height="24" Margin="2"/> |
| 102 | + <TextBlock VerticalAlignment="Center" Text="{Binding NameComputed}"/> |
| 103 | + <StackPanel.ContextMenu> |
| 104 | + <ContextMenu IsVisible="{Binding IsLeafNode}"> |
| 105 | + <MenuItem Header="Open folder" Command="{Binding $parent[TreeDataGrid].((vm:FolderTreeViewModel)DataContext).OpenFolderFor}" CommandParameter="{Binding}" /> |
| 106 | + </ContextMenu> |
| 107 | + </StackPanel.ContextMenu> |
| 108 | + </StackPanel> |
| 109 | + </DataTemplate> |
| 110 | + <!-- Edit template for Name column cells --> |
| 111 | + <DataTemplate x:Key="Edit" DataType="mo:FileSystemItem"> |
| 112 | + <StackPanel Orientation="Horizontal" > |
| 113 | + <materialIcons:MaterialIcon Kind="{Binding DisplayName, Converter={StaticResource EnumToMaterialIconConverter}}" Width="24" Height="24" Margin="2" /> |
| 114 | + <TextBlock VerticalAlignment="Center" Text="{Binding NameComputed}"/> |
| 115 | + <StackPanel.ContextMenu> |
| 116 | + <ContextMenu IsVisible="{Binding IsLeafNode}"> |
| 117 | + <MenuItem Header="Open folder" Command="{Binding $parent[TreeDataGrid].((vm:FolderTreeViewModel)DataContext).OpenFolderFor}" CommandParameter="{Binding}" /> |
| 118 | + </ContextMenu> |
| 119 | + </StackPanel.ContextMenu> |
| 120 | + </StackPanel> |
| 121 | + </DataTemplate> |
| 122 | + </TreeDataGrid.Resources> |
| 123 | + </TreeDataGrid> |
| 124 | + </Border> |
| 125 | + </Grid> |
| 126 | + </DockPanel> |
129 | 127 |
|
130 | 128 | </UserControl>
|
0 commit comments