Skip to content

Commit 7420b6a

Browse files
authored
Only only "open file location" for .lnk files in properties (#1648)
1 parent 9115af7 commit 7420b6a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Files/View Models/Properties/FileProperties.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public override void GetBaseProperties()
5959
ViewModel.ShortcutItemWorkingDirVisibility = Item.IsLinkItem ? Visibility.Collapsed : Visibility.Visible;
6060
ViewModel.ShortcutItemArguments = shortcutItem.Arguments;
6161
ViewModel.ShortcutItemArgumentsVisibility = Item.IsLinkItem ? Visibility.Collapsed : Visibility.Visible;
62+
ViewModel.IsSelectedItemShortcut = Item.FileExtension.Equals(".lnk", StringComparison.OrdinalIgnoreCase);
6263
ViewModel.ShortcutItemOpenLinkCommand = new GalaSoft.MvvmLight.Command.RelayCommand(async () =>
6364
{
6465
if (Item.IsLinkItem)

Files/Views/Pages/PropertiesShortcut.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
<Button
181181
x:Name="OpenLinkButton"
182182
x:Uid="PropertiesDialogOpenLinkButton"
183+
x:Load="{x:Bind ViewModel.IsSelectedItemShortcut, Mode=OneWay}"
183184
MinWidth="100"
184185
Command="{x:Bind ViewModel.ShortcutItemOpenLinkCommand, Mode=OneWay}"
185186
Content="Open file location"

0 commit comments

Comments
 (0)