Add full XAML support for .NET MAUI compatibility
New features:
- MauiAppBuilderExtensions.UseOpenMauiLinux() for standard MAUI integration
- New template: openmaui-linux-xaml with full XAML support
- Standard MAUI XAML syntax (ContentPage, VerticalStackLayout, etc.)
- Resource dictionaries (Colors.xaml, Styles.xaml)
- Compiled XAML support via MauiXaml items
Templates now available:
- dotnet new openmaui-linux (code-based UI)
- dotnet new openmaui-linux-xaml (XAML-based UI)
Usage:
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseOpenMauiLinux(); // Enable Linux with XAML
This commit is contained in:
38
templates/openmaui-linux-xaml-app/OpenMauiXamlApp.csproj
Normal file
38
templates/openmaui-linux-xaml-app/OpenMauiXamlApp.csproj
Normal file
@@ -0,0 +1,38 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>OpenMauiXamlApp</RootNamespace>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<!-- Enable XAML compilation -->
|
||||
<EnableDefaultXamlItems>true</EnableDefaultXamlItems>
|
||||
|
||||
<!-- Linux Runtime -->
|
||||
<RuntimeIdentifiers>linux-x64;linux-arm64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- OpenMaui Linux Platform -->
|
||||
<PackageReference Include="OpenMaui.Controls.Linux" Version="1.0.0-preview.*" />
|
||||
|
||||
<!-- Core MAUI packages (includes XAML support) -->
|
||||
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.*" />
|
||||
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.*" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- XAML Files -->
|
||||
<ItemGroup>
|
||||
<MauiXaml Update="**/*.xaml" />
|
||||
<MauiXaml Update="App.xaml" />
|
||||
<MauiXaml Update="MainPage.xaml" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Embedded Resources -->
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\**\*" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user