Refs #28. Align WinUI and WPF Help commands with gclo and add native menu acceptance without launching a browser. Co-Authored-By: Codex (GPT-6) <noreply@openai.com> Signed-off-by: James Maes <james@kof22.com>
51 lines
2.8 KiB
XML
51 lines
2.8 KiB
XML
<Window
|
|
x:Class="AppKit.Sample.Wpf.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Width="900"
|
|
Height="600"
|
|
MinWidth="640"
|
|
MinHeight="420">
|
|
|
|
<Grid x:Name="RootGrid">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Menu>
|
|
<MenuItem Header="_File">
|
|
<MenuItem Header="E_xit" Click="Exit_Click" />
|
|
</MenuItem>
|
|
<MenuItem Header="_View">
|
|
<MenuItem x:Name="ThemeSystem" Header="System theme" Tag="System" IsCheckable="True" Click="Theme_Click" />
|
|
<MenuItem x:Name="ThemeLight" Header="Light theme" Tag="Light" IsCheckable="True" Click="Theme_Click" />
|
|
<MenuItem x:Name="ThemeDark" Header="Dark theme" Tag="Dark" IsCheckable="True" Click="Theme_Click" />
|
|
<Separator />
|
|
<MenuItem x:Name="SplashToggle" Header="Show splash at startup" IsCheckable="True" Click="Splash_Click" />
|
|
</MenuItem>
|
|
<MenuItem Header="_Help">
|
|
<MenuItem Header="View on _GitHub" AutomationProperties.AutomationId="MenuGitHub" Click="GitHub_Click" />
|
|
<MenuItem Header="Submit an _issue…" AutomationProperties.AutomationId="MenuSubmitIssue" ToolTip="Report a bug or request a feature on GitHub" Click="SubmitIssue_Click" />
|
|
<MenuItem Header="Community _support…" AutomationProperties.AutomationId="MenuCommunitySupport" ToolTip="Ask a question or share tips in GitHub Discussions" Click="CommunitySupport_Click" />
|
|
<Separator />
|
|
<MenuItem x:Name="CheckForUpdatesMenuItem" Header="Check for _updates" Click="CheckForUpdates_Click" />
|
|
<MenuItem x:Name="ActivityLogMenuItem" Header="Activity _log" Click="ActivityLog_Click" />
|
|
<Separator />
|
|
<MenuItem x:Name="AboutMenuItem" Header="_About AppKit Sample" Click="About_Click" />
|
|
</MenuItem>
|
|
</Menu>
|
|
|
|
<StackPanel Grid.Row="1" Margin="32" MaxWidth="560" HorizontalAlignment="Left">
|
|
<TextBlock x:Name="GreetingText" FontSize="28" FontWeight="SemiBold" />
|
|
<TextBlock Margin="0,12,0,0" TextWrapping="Wrap" Text="Each control below exercises one AppKit service. Settings persist to %LOCALAPPDATA%\appkit-sample\settings.json; the log lives beside it." />
|
|
<StackPanel Margin="0,12,0,0" Orientation="Horizontal">
|
|
<Button Content="Write a log entry" Click="LogInfo_Click" />
|
|
<Button Margin="8,0,0,0" Content="Log a handled error" Click="LogError_Click" />
|
|
<Button x:Name="ThrowButton" Margin="8,0,0,0" Content="Throw unhandled" Click="Throw_Click" />
|
|
</StackPanel>
|
|
<TextBlock x:Name="StatusText" Margin="0,12,0,0" Opacity="0.7" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Window>
|