Skip to content

Commit fadcec6

Browse files
authored
Update Maui toolkit to .NET 9 (#15)
1 parent 9a122d7 commit fadcec6

File tree

6 files changed

+23
-28
lines changed

6 files changed

+23
-28
lines changed

src/Esri.Calcite.Maui/CalciteResources.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<ResourceDictionary xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4-
xmlns:styles="clr-namespace:Esri.Calcite.Maui.Styles"
54
x:Class="Esri.Calcite.Maui.CalciteResources">
65
<ResourceDictionary.MergedDictionaries>
76
<ResourceDictionary Source="Resources/Styles/Brushes.xaml" />

src/Esri.Calcite.Maui/Esri.Calcite.Maui.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net8.0-windows10.0.19041.0;net9.0;net9.0-windows10.0.19041.0</TargetFrameworks>
4+
<TargetFrameworks>net9.0;net9.0-windows10.0.19041.0</TargetFrameworks>
55
<UseMaui>true</UseMaui>
66
<SingleProject>true</SingleProject>
77
<ImplicitUsings>enable</ImplicitUsings>
@@ -26,12 +26,12 @@
2626
<Link>Resources\Styles\%(Filename).xaml</Link>
2727
</MauiXaml>
2828
</ItemGroup>
29-
30-
<ItemGroup>
31-
<None Include="build\net8.0\Esri.Calcite.Maui.targets" Pack="True" PackagePath="build\net8.0\;buildTransitive\net8.0\" />
32-
</ItemGroup>
29+
30+
<ItemGroup>
31+
<None Include="build\net9.0\Esri.Calcite.Maui.targets" Pack="True" PackagePath="build\net9.0\;buildTransitive\net9.0\" />
32+
</ItemGroup>
33+
3334
<ItemGroup>
34-
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.3" Condition="$(TargetFramework.StartsWith('net8.0'))" />
3535
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.0" Condition="$(TargetFramework.StartsWith('net9.0'))" />
3636
</ItemGroup>
3737
<Target Name="GetResources" BeforeTargets="Build" DependsOnTargets="DownloadFonts" />

src/Esri.Calcite.Maui/Resources/Styles/Styles.xaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,6 @@
266266

267267
</Style>
268268
<!--
269-
<Style TargetType="Frame">
270-
<Setter Property="HasShadow" Value="False" />
271-
<Setter Property="BorderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
272-
<Setter Property="CornerRadius" Value="8" />
273-
</Style>
274-
275269
<Style TargetType="ImageButton">
276270
<Setter Property="Opacity" Value="1" />
277271
<Setter Property="BorderColor" Value="Transparent"/>

src/TestApps/MauiTests/AppShell.xaml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,22 @@
1414
</FlyoutItem>
1515
<Shell.FlyoutContent>
1616
<ContentView>
17-
<StackLayout HorizontalOptions="Fill" Padding="20" WidthRequest="320">
18-
<Frame CornerRadius="25" Padding="0" WidthRequest="50" HeightRequest="50" Background="{StaticResource CalciteBrandLightColor}">
17+
<StackLayout HorizontalOptions="Fill" Padding="20" WidthRequest="320">
18+
<Border Padding="0" WidthRequest="50" HeightRequest="50" Background="{StaticResource CalciteBrandLightColor}">
19+
<Border.StrokeShape>
20+
<RoundRectangle CornerRadius="25" />
21+
</Border.StrokeShape>
1922
<Image Source="{calcite:CalciteIconImage Icon=BrushTip, Size=30, Scale=Large,Color=White}" WidthRequest="30" />
20-
</Frame>
23+
</Border>
2124
<Label Text="Calcite" HorizontalOptions="Center" FontAttributes="Bold" FontSize="Subtitle" />
22-
<Label Text="for .NET MAUI" HorizontalOptions="Center" FontSize="Caption" />
23-
<Button Text="Visit GitHub" Clicked="GitHubButton_Clicked" Margin="20" />
24-
</StackLayout>
25-
</ContentView>
25+
<Label Text="for .NET MAUI" HorizontalOptions="Center" FontSize="Caption" />
26+
<Button Text="Visit GitHub" Clicked="GitHubButton_Clicked" Margin="20" />
27+
</StackLayout>
28+
</ContentView>
2629
</Shell.FlyoutContent>
2730

2831
<Shell.ToolbarItems>
2932
<ToolbarItem Text="Toggle Darkmode"
3033
IconImageSource="{calcite:CalciteIconImage Icon=Moon}" Clicked="ToolbarItem_Clicked" />
3134
</Shell.ToolbarItems>
32-
</Shell>
35+
</Shell>

src/TestApps/MauiTests/MauiTests.csproj

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
5-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
4+
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
5+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
66
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
7-
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
7+
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->
88
<OutputType>Exe</OutputType>
99
<RootNamespace>MauiTests</RootNamespace>
1010
<UseMaui>true</UseMaui>
@@ -23,13 +23,12 @@
2323
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
2424
<ApplicationVersion>1</ApplicationVersion>
2525

26-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
27-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
26+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
27+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
2828
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
2929
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
3030
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
3131
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
32-
<WindowsSdkPackageVersion>10.0.19041.38</WindowsSdkPackageVersion>
3332
</PropertyGroup>
3433

3534
<ItemGroup>
@@ -51,7 +50,7 @@
5150
</ItemGroup>
5251

5352
<ItemGroup>
54-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
53+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
5554
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
5655
</ItemGroup>
5756

0 commit comments

Comments
 (0)