File tree Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 9
9
xmlns:mc=" http://schemas.openxmlformats.org/markup-compatibility/2006"
10
10
xmlns:properties=" using:Files.App.ViewModels.Properties"
11
11
xmlns:triggers=" using:CommunityToolkit.WinUI.UI.Triggers"
12
+ xmlns:usercontrols=" using:Files.App.UserControls"
12
13
x:Name=" Root"
13
14
MinWidth=" 90"
14
15
HorizontalAlignment=" Stretch"
267
268
</DataTemplate >
268
269
</ItemsControl .ItemTemplate>
269
270
</ItemsControl >
271
+
272
+ <!-- Open Properties Button -->
273
+ <Button
274
+ x:Name=" DetailsOpenProperties"
275
+ Margin=" 8,0,8,8"
276
+ HorizontalAlignment=" Left"
277
+ Command=" {x:Bind Commands.OpenProperties}"
278
+ IsEnabled=" {x:Bind Commands.OpenProperties.IsExecutable, Mode=OneWay}"
279
+ ToolTipService.ToolTip=" {x:Bind Commands.OpenProperties.LabelWithHotKey, Mode=OneWay}" >
280
+ <Button .Content>
281
+ <StackPanel Orientation =" Horizontal" Spacing =" 8" >
282
+ <usercontrols : OpacityIcon Style =" {x:Bind Commands.OpenProperties.OpacityStyle}" />
283
+ <TextBlock Text =" {helpers:ResourceString Name=Properties}" />
284
+ </StackPanel >
285
+ </Button .Content>
286
+ </Button >
270
287
</StackPanel >
271
288
</ScrollViewer >
272
289
Original file line number Diff line number Diff line change 1
1
// Copyright (c) 2023 Files Community
2
2
// Licensed under the MIT License. See the LICENSE.
3
3
4
- using CommunityToolkit . Mvvm . ComponentModel ;
5
- using CommunityToolkit . Mvvm . DependencyInjection ;
6
- using Files . App . Extensions ;
7
- using Files . App . ViewModels ;
8
- using Files . Core . Services . Settings ;
9
4
using Microsoft . UI . Xaml ;
10
5
using Microsoft . UI . Xaml . Controls ;
11
6
using Microsoft . UI . Xaml . Input ;
@@ -25,6 +20,8 @@ public sealed partial class PreviewPane : UserControl
25
20
26
21
private readonly IPreviewPaneSettingsService PaneSettingsService ;
27
22
23
+ private readonly ICommandManager Commands ;
24
+
28
25
private readonly PreviewPaneViewModel ViewModel ;
29
26
30
27
private ObservableContext Context { get ; } = new ( ) ;
@@ -33,6 +30,7 @@ public PreviewPane()
33
30
{
34
31
InitializeComponent ( ) ;
35
32
PaneSettingsService = Ioc . Default . GetRequiredService < IPreviewPaneSettingsService > ( ) ;
33
+ Commands = Ioc . Default . GetRequiredService < ICommandManager > ( ) ;
36
34
ViewModel = Ioc . Default . GetRequiredService < PreviewPaneViewModel > ( ) ;
37
35
}
38
36
Original file line number Diff line number Diff line change @@ -65,7 +65,8 @@ private async Task LoadPreviewAndDetailsAsync()
65
65
}
66
66
67
67
var tags = Item . FileTagsUI is not null ? string . Join ( ',' , Item . FileTagsUI . Select ( x => x . Name ) ) : null ;
68
- Item . FileDetails . Add ( GetFileProperty ( "FileTags" , tags ) ) ;
68
+ if ( tags is not null )
69
+ Item . FileDetails . Add ( GetFileProperty ( "FileTags" , tags ) ) ;
69
70
}
70
71
71
72
private static FileProperty GetFileProperty ( string nameResource , object value )
You can’t perform that action at this time.
0 commit comments