-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System.Reflection; | ||
|
||
namespace Maui.ServerDrivenUI.Xaml; | ||
|
||
public static class Extensions | ||
{ | ||
public static TXaml LoadXaml<TXaml>(this TXaml view, Type callingType) | ||
{ | ||
XamlLoader.Load(view, callingType); | ||
Check warning on line 9 in Microsoft.Maui.Core.DeviceTests/Extensions.cs GitHub Actions / Build and publish package
Check warning on line 9 in Microsoft.Maui.Core.DeviceTests/Extensions.cs GitHub Actions / Build and publish package
Check warning on line 9 in Microsoft.Maui.Core.DeviceTests/Extensions.cs GitHub Actions / Build and publish package
|
||
return view; | ||
} | ||
|
||
public static TXaml LoadXaml<TXaml>(this TXaml view, string xaml) | ||
{ | ||
XamlLoader.Load(view, xaml); | ||
Check warning on line 15 in Microsoft.Maui.Core.DeviceTests/Extensions.cs GitHub Actions / Build and publish package
Check warning on line 15 in Microsoft.Maui.Core.DeviceTests/Extensions.cs GitHub Actions / Build and publish package
|
||
return view; | ||
} | ||
|
||
internal static TXaml LoadXaml<TXaml>(this TXaml view, string xaml, Assembly rootAssembly) | ||
{ | ||
XamlLoader.Load(view, xaml, rootAssembly); | ||
Check warning on line 21 in Microsoft.Maui.Core.DeviceTests/Extensions.cs GitHub Actions / Build and publish package
Check warning on line 21 in Microsoft.Maui.Core.DeviceTests/Extensions.cs GitHub Actions / Build and publish package
|
||
return view; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
global using Microsoft.Maui.Controls.Internals; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>net8.0-android;net8.0-ios17;net8.0-maccatalyst</TargetFrameworks> | ||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<UseMaui>true</UseMaui> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.3" /> | ||
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.3" /> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" /> | ||
</ItemGroup> | ||
</Project> |