Browse Source

Update context menu bindings enabled status

Ruben 4 tháng trước cách đây
mục cha
commit
edb0f7ce0a
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      src/PicView.Avalonia/Views/MainView.axaml

+ 4 - 2
src/PicView.Avalonia/Views/MainView.axaml

@@ -104,7 +104,7 @@
                                                    FallbackValue=''}"
                 Header="{CompiledBinding Translation.OpenWith,
                                          Mode=OneWay}"
-                IsEnabled="{CompiledBinding PicViewer.ImageSource,
+                IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                             Converter={x:Static ObjectConverters.IsNotNull}}"
                 x:Name="OpenWithMenuItem">
                 <MenuItem.Icon>
@@ -123,7 +123,9 @@
                 CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                    FallbackValue=''}"
                 Header="{CompiledBinding Translation.ShowInFolder,
-                                         Mode=OneWay}">
+                                         Mode=OneWay}"
+                IsEnabled="{CompiledBinding PicViewer.FileInfo,
+                                            Converter={x:Static ObjectConverters.IsNotNull}}">
                 <MenuItem.Icon>
                     <Path
                         Data="{StaticResource ShowInFolderGeometry}"