8f27aee11a
The title bar Image used Source="ms-appx:///Assets/Square44x44Logo.scale-200.png". That resolves fine in a normal build (Assets/ and AmiReel.pri sit next to the exe), but a single-file self-contained publish (IncludeAllContentForSelfExtract=true) bundles Content items into the exe in a way ms-appx:// can no longer resolve at runtime, leaving the title bar icon blank — reproduced with the actual publish-win-x64.ps1 output, confirmed fixed the same way. Load the icon from a plain embedded resource instead (same mechanism already used for ffmpeg.exe/ffprobe.exe): the PNG is embedded via <EmbeddedResource LogicalName="AmiReel.Assets.TitleBarIcon.png">, and MainWindow loads it at startup via GetManifestResourceStream + BitmapImage. SetSourceAsync. This bypasses the ms-appx/MRT resource pipeline entirely, so it behaves identically in dotnet build, dotnet run, and a single-file publish. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
39 lines
1.5 KiB
XML
39 lines
1.5 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<Window
|
|
x:Class="AmiReel.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="using:AmiReel"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
Title="AmiReel"
|
|
mc:Ignorable="d">
|
|
<Grid Background="{ThemeResource PageBrush}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid x:Name="AppTitleBar" Grid.Row="0" Height="44" Background="{ThemeResource PanelBrush}">
|
|
<StackPanel Orientation="Horizontal" Spacing="10" VerticalAlignment="Center" Margin="14,0,0,0">
|
|
<Image x:Name="TitleBarIcon"
|
|
Width="20"
|
|
Height="20"
|
|
Stretch="Uniform" />
|
|
<TextBlock Text="AmiReel"
|
|
FontFamily="Bahnschrift"
|
|
FontSize="14"
|
|
FontWeight="SemiBold"
|
|
VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<!--
|
|
The Frame hosts pages for your application content. Add your UI to
|
|
MainPage.xaml rather than here so you can use Page features such as
|
|
navigation events and the Loaded lifecycle.
|
|
-->
|
|
<Frame x:Name="RootFrame" Grid.Row="1" />
|
|
</Grid>
|
|
</Window>
|