精简manifest引用,自定义titlebar
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
root = true
|
root = true
|
||||||
|
|
||||||
|
# Workaround for https://github.com/microsoft/microsoft-ui-xaml/issues/10855
|
||||||
|
[XamlTypeInfo.g.cs]
|
||||||
|
dotnet_diagnostic.CS0612.severity = none
|
||||||
|
dotnet_diagnostic.CS0618.severity = none
|
||||||
|
|
||||||
# All files
|
# All files
|
||||||
[*]
|
[*]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
|
|||||||
BIN
Assets/Logo/app_128.ico
Normal file
BIN
Assets/Logo/app_128.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
BIN
Assets/Logo/app_64.ico
Normal file
BIN
Assets/Logo/app_64.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
BIN
Assets/Logo/app_64.png
Normal file
BIN
Assets/Logo/app_64.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 991 B |
@@ -4,15 +4,23 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="using:MyApp"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:winex="using:WinUIEx"
|
xmlns:winex="using:WinUIEx"
|
||||||
|
Title="MainWindow"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Window.SystemBackdrop>
|
<Window.SystemBackdrop>
|
||||||
<MicaBackdrop />
|
<MicaBackdrop />
|
||||||
</Window.SystemBackdrop>
|
</Window.SystemBackdrop>
|
||||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
||||||
<TextBlock>Pure WinUI3</TextBlock>
|
<Grid>
|
||||||
<TextBlock>None</TextBlock>
|
<Grid.RowDefinitions>
|
||||||
</StackPanel>
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TitleBar x:Name="AppTitleBar" Title="{x:Bind Title}">
|
||||||
|
<TitleBar.IconSource>
|
||||||
|
<ImageIconSource ImageSource="/Assets/Logo/app_64.png" />
|
||||||
|
</TitleBar.IconSource>
|
||||||
|
</TitleBar>
|
||||||
|
</Grid>
|
||||||
</winex:WindowEx>
|
</winex:WindowEx>
|
||||||
|
|||||||
@@ -5,10 +5,9 @@ public sealed partial class MainWindow : WindowEx
|
|||||||
{
|
{
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
InitializeComponent();
|
||||||
this.SetIcon("Assets/Logo/app.ico");
|
this.SetIcon("Assets/Logo/app_64.ico");
|
||||||
Title = "Pure";
|
ExtendsContentIntoTitleBar = true;
|
||||||
Width = 600;
|
SetTitleBar(AppTitleBar);
|
||||||
Height = 480;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,4 @@
|
|||||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.8.260209005" />
|
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.8.260209005" />
|
||||||
<PackageReference Include="WinUIEx" Version="2.9.0" />
|
<PackageReference Include="WinUIEx" Version="2.9.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Manifest Include="$(ApplicationManifest)" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
Reference in New Issue
Block a user