mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Negate items in native menu check.
This commit is contained in:
@@ -27,8 +27,8 @@ namespace Aaru.Gui.ViewModels
|
||||
|
||||
public string Greeting => "Welcome to Aaru!";
|
||||
|
||||
public bool NativeMenuNotSupported =>
|
||||
!NativeMenu.GetIsNativeMenuExported((Application.Current.ApplicationLifetime as
|
||||
public bool NativeMenuSupported =>
|
||||
NativeMenu.GetIsNativeMenuExported((Application.Current.ApplicationLifetime as
|
||||
IClassicDesktopStyleApplicationLifetime)?.MainWindow);
|
||||
|
||||
public ReactiveCommand<Unit, Unit> AboutCommand { get; }
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
<Menu DockPanel.Dock="Top">
|
||||
<MenuItem Header="_File">
|
||||
<MenuItem Header="_Open" /> <Separator />
|
||||
<MenuItem Header="_Settings" IsVisible="{Binding NativeMenuNotSupported}"
|
||||
<MenuItem Header="_Settings" IsVisible="{Binding !NativeMenuSupported}"
|
||||
Command="{Binding SettingsCommand}" />
|
||||
<Separator />
|
||||
<MenuItem Header="E_xit" IsVisible="{Binding NativeMenuNotSupported}" Command="{Binding ExitCommand}" />
|
||||
<MenuItem Header="E_xit" IsVisible="{Binding !NativeMenuSupported}" Command="{Binding ExitCommand}" />
|
||||
</MenuItem>
|
||||
<MenuItem Header="_Devices">
|
||||
<MenuItem Header="_Refresh" />
|
||||
@@ -25,8 +25,8 @@
|
||||
<MenuItem Header="_Encodings" Command="{Binding EncodingsCommand}" />
|
||||
<MenuItem Header="_Plugins" Command="{Binding PluginsCommand}" />
|
||||
<MenuItem Header="_Statistics" Command="{Binding StatisticsCommand}" />
|
||||
<Separator IsVisible="{Binding NativeMenuNotSupported}" />
|
||||
<MenuItem Header="_About" Name="AboutMenuItem" IsVisible="{Binding NativeMenuNotSupported}"
|
||||
<Separator IsVisible="{Binding !NativeMenuSupported}" />
|
||||
<MenuItem Header="_About" Name="AboutMenuItem" IsVisible="{Binding !NativeMenuSupported}"
|
||||
Command="{Binding AboutCommand}" />
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
|
||||
Reference in New Issue
Block a user