File tree Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 4
4
xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
5
5
xmlns : d =" http://schemas.microsoft.com/expression/blend/2008"
6
6
xmlns : local2 =" using:Files.Helpers"
7
- xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
7
+ xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
8
+ xmlns : Windows10version1903 =" http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract, 8)"
8
9
x : Name =" PropertiesDialogMarkup"
9
- Background =" Transparent"
10
10
mc : Ignorable =" d"
11
11
RequestedTheme =" {x:Bind local2:ThemeHelper.RootTheme}" >
12
+ <ContentDialog .Background>
13
+ <AcrylicBrush
14
+ Windows10version1903 : TintLuminosityOpacity =" 0.9"
15
+ AlwaysUseFallback =" {x:Bind AppSettings.AcrylicEnabled, Mode=OneWay}"
16
+ BackgroundSource =" HostBackdrop"
17
+ FallbackColor =" {x:Bind AppSettings.AcrylicTheme.FallbackColor, Mode=OneWay}"
18
+ TintColor =" {x:Bind AppSettings.AcrylicTheme.TintColor, Mode=OneWay}"
19
+ TintOpacity =" {x:Bind AppSettings.AcrylicTheme.TintOpacity, Mode=OneWay}" />
20
+ </ContentDialog .Background>
12
21
<ContentDialog .Resources>
13
22
<Thickness x : Key =" ContentDialogPadding" >0</Thickness >
14
23
</ContentDialog .Resources>
Original file line number Diff line number Diff line change 1
- using Windows . UI . Xaml . Controls ;
1
+ using Files . View_Models ;
2
+ using Windows . UI . Xaml . Controls ;
2
3
3
4
// The Content Dialog item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
4
5
5
6
namespace Files . Dialogs
6
7
{
7
8
public sealed partial class PropertiesDialog : ContentDialog
8
9
{
10
+ public SettingsViewModel AppSettings => App . AppSettings ;
9
11
public PropertiesDialog ( )
10
12
{
11
13
this . InitializeComponent ( ) ;
Original file line number Diff line number Diff line change 22
22
using FileAttributes = System . IO . FileAttributes ;
23
23
using ByteSizeLib ;
24
24
using static Files . Helpers . NativeFindStorageItemHelper ;
25
+ using Windows . UI . Xaml . Media . Imaging ;
25
26
26
27
namespace Files
27
28
{
@@ -171,6 +172,18 @@ private async void GetFileProperties(CancellationTokenSource _tokenSource)
171
172
ViewModel . ItemSize = ByteSize . FromBytes ( ViewModel . Item . FileSizeBytes ) . ToBinaryString ( ) . ConvertSizeAbbreviation ( )
172
173
+ " (" + ByteSize . FromBytes ( ViewModel . Item . FileSizeBytes ) . Bytes . ToString ( "#,##0" ) + " " + ResourceController . GetTranslation ( "ItemSizeBytes" ) + ")" ;
173
174
175
+ using ( var Thumbnail = await file . GetThumbnailAsync ( ThumbnailMode . SingleItem , 80 , ThumbnailOptions . UseCurrentScale ) )
176
+ {
177
+ BitmapImage icon = new BitmapImage ( ) ;
178
+ if ( Thumbnail != null )
179
+ {
180
+ ViewModel . FileIconSource = icon ;
181
+ await icon . SetSourceAsync ( Thumbnail ) ;
182
+ ViewModel . LoadUnknownTypeGlyph = false ;
183
+ ViewModel . LoadFileIcon = true ;
184
+ }
185
+ }
186
+
174
187
// Get file MD5 hash
175
188
var hashAlgTypeName = HashAlgorithmNames . Md5 ;
176
189
ViewModel . ItemMD5HashProgressVisibility = Visibility . Visible ;
You can’t perform that action at this time.
0 commit comments