Skip to content

Commit 0fb855b

Browse files
committed
Update to .NET9.0
1 parent daca5ce commit 0fb855b

20 files changed

+57
-41
lines changed

demo/UraniumApp/MainPage.xaml

+14
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,19 @@
3131

3232
<uranium:SelectableLabel Margin="15" Text="Hello, World! This text should be selectable!" />
3333

34+
<material:PickerField Title="Monkeys">
35+
<material:PickerField.ItemsSource>
36+
<x:Array Type="{x:Type x:String}">
37+
<x:String>Baboon</x:String>
38+
<x:String>Capuchin Monkey</x:String>
39+
<x:String>Blue Monkey</x:String>
40+
<x:String>Squirrel Monkey</x:String>
41+
<x:String>Golden Lion Tamarin</x:String>
42+
<x:String>Howler Monkey</x:String>
43+
<x:String>Japanese Macaque</x:String>
44+
</x:Array>
45+
</material:PickerField.ItemsSource>
46+
</material:PickerField>
47+
3448
</VerticalStackLayout>
3549
</ContentPage>

demo/UraniumApp/UraniumApp.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<Import Project="..\..\maui.common.props" />
44

55
<PropertyGroup>
6-
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
7-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
6+
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
7+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
88
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
99
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
1010
<OutputType>Exe</OutputType>

maui.common.props

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
<Project>
2-
<PropertyGroup>
3-
<MauiVersion>8.0.21</MauiVersion>
2+
<PropertyGroup Condition="$(TargetFramework.Contains('net8'))">
3+
<MauiVersion>8.0.83</MauiVersion>
44
</PropertyGroup>
5-
<!-- <PropertyGroup Condition="$(TargetFramework.Contains('net7'))">
6-
<MauiVersion>7.0.92</MauiVersion>
5+
<PropertyGroup Condition="$(TargetFramework.Contains('net9'))">
6+
<MauiVersion>9.0.10</MauiVersion>
77
</PropertyGroup>
8-
<PropertyGroup Condition="$(TargetFramework.Contains('net6'))">
9-
<MauiVersion>6.0.552</MauiVersion>
10-
</PropertyGroup> -->
118
</Project>

src/UraniumUI.Blurs/BlurPlatformEffect.Android.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected void UpdateEffect()
6767
if (_mainDrawable == null)
6868
{
6969
_mainDrawable = new GradientDrawable();
70-
_mainDrawable.SetColor(Colors.Transparent.ToAndroid());
70+
_mainDrawable.SetColor(Colors.Transparent.ToPlatform());
7171
Control.Background = _mainDrawable;
7272
}
7373

@@ -116,12 +116,12 @@ protected Android.Graphics.Color GetColor()
116116
{
117117
if (VirtualEffect?.AccentColor != null && VirtualEffect.AccentColor.IsNotDefault())
118118
{
119-
return VirtualEffect.AccentColor.WithAlpha(VirtualEffect.AccentOpacity).ToAndroid();
119+
return VirtualEffect.AccentColor.WithAlpha(VirtualEffect.AccentOpacity).ToPlatform();
120120
}
121121

122122
return VirtualEffect?.Mode == BlurMode.Dark
123-
? Colors.Black.WithAlpha(VirtualEffect.AccentOpacity).ToAndroid()
124-
: Colors.White.WithAlpha(VirtualEffect.AccentOpacity).ToAndroid();
123+
? Colors.Black.WithAlpha(VirtualEffect.AccentOpacity).ToPlatform()
124+
: Colors.White.WithAlpha(VirtualEffect.AccentOpacity).ToPlatform();
125125
}
126126

127127
private void AlignBlurView()

src/UraniumUI.Blurs/UraniumUI.Blurs.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<Import Project="..\..\common.props" />
55

66
<PropertyGroup>
7-
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
8-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
7+
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst;net9.0;net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
8+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0;net9.0-windows10.0.19041.0</TargetFrameworks>
99
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
1010
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
1111
<UseMaui>true</UseMaui>

src/UraniumUI.Dialogs.CommunityToolkit/UraniumUI.Dialogs.CommunityToolkit.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<Import Project="..\..\common.props" />
55

66
<PropertyGroup>
7-
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
8-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
7+
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst;net9.0;net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
8+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0;net9.0-windows10.0.19041.0</TargetFrameworks>
99
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
1010
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
1111
<UseMaui>true</UseMaui>
@@ -26,7 +26,7 @@
2626
</PropertyGroup>
2727

2828
<ItemGroup>
29-
<PackageReference Include="CommunityToolkit.Maui" Version="9.0.2" />
29+
<PackageReference Include="CommunityToolkit.Maui" Version="9.1.1" />
3030
</ItemGroup>
3131

3232
<ItemGroup>

src/UraniumUI.Dialogs.Mopups/UraniumUI.Dialogs.Mopups.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<Import Project="..\..\common.props" />
55

66
<PropertyGroup>
7-
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
8-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
7+
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst;net9.0;net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
8+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0;net9.0-windows10.0.19041.0</TargetFrameworks>
99
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
1010
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
1111
<UseMaui>true</UseMaui>
@@ -26,7 +26,7 @@
2626
</PropertyGroup>
2727

2828
<ItemGroup>
29-
<PackageReference Include="Mopups" Version="1.3.0" />
29+
<PackageReference Include="Mopups" Version="1.3.2" />
3030
</ItemGroup>
3131

3232
<ItemGroup>

src/UraniumUI.Icons.FontAwesome/UraniumUI.Icons.FontAwesome.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<Import Project="..\..\common.props" />
55

66
<PropertyGroup>
7-
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
8-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
7+
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst;net9.0;net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
8+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0;net9.0-windows10.0.19041.0</TargetFrameworks>
99
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
1010
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
1111
<UseMaui>true</UseMaui>

src/UraniumUI.Icons.MaterialIcons/UraniumUI.Icons.MaterialIcons.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<Import Project="..\..\common.props" />
55

66
<PropertyGroup>
7-
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
8-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
7+
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst;net9.0;net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
8+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0;net9.0-windows10.0.19041.0</TargetFrameworks>
99
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
1010
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
1111
<UseMaui>true</UseMaui>

src/UraniumUI.Icons.MaterialSymbols/UraniumUI.Icons.MaterialSymbols.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<Import Project="..\..\common.props" />
55

66
<PropertyGroup>
7-
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
8-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
7+
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst;net9.0;net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
8+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0;net9.0-windows10.0.19041.0</TargetFrameworks>
99
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
1010
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
1111
<UseMaui>true</UseMaui>

src/UraniumUI.Icons.SegoeFluent/UraniumUI.Icons.SegoeFluent.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66

77
<PropertyGroup>
8-
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
9-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
8+
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst;net9.0;net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
9+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0;net9.0-windows10.0.19041.0</TargetFrameworks>
1010
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
1111
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
1212
<UseMaui>true</UseMaui>

src/UraniumUI.Material/Handlers/ButtonViewHandler.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NET8_0
1+
#if NET8_0 || NET9_0
22

33
using Microsoft.Maui.Handlers;
44
using System.Windows.Input;

src/UraniumUI.Material/UraniumUI.Material.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<Import Project="..\..\common.props" />
55

66
<PropertyGroup>
7-
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
8-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
7+
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst;net9.0;net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
8+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0;net9.0-windows10.0.19041.0</TargetFrameworks>
99
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
1010
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
1111
<UseMaui>true</UseMaui>

src/UraniumUI.Validations.DataAnnotations/UraniumUI.Validations.DataAnnotations.csproj

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Import Project="..\..\common.props" />
55

66
<PropertyGroup>
7-
<TargetFrameworks>net8.0</TargetFrameworks>
7+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
88

99
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
1010
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
@@ -30,4 +30,8 @@
3030
<PackageReference Include="InputKit.Maui" Version="4.4.7" />
3131
</ItemGroup>
3232

33+
<ItemGroup Condition="$(TargetFramework.Contains('net9'))">
34+
<PackageReference Include="InputKit.Maui" Version="4.4.7" />
35+
</ItemGroup>
36+
3337
</Project>

src/UraniumUI.WebComponents/UraniumUI.WebComponents.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<Import Project="..\..\common.props" />
55

66
<PropertyGroup>
7-
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
8-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
7+
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst;net9.0;net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
8+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0;net9.0-windows10.0.19041.0</TargetFrameworks>
99
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
1010
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
1111
<UseMaui>true</UseMaui>

src/UraniumUI/Handlers/AutoCompleteViewHandler.Android.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using Microsoft.Maui.Controls.Compatibility.Platform.Android;
99
using Microsoft.Maui.Controls.Platform;
1010
using Microsoft.Maui.Handlers;
11+
using Microsoft.Maui.Platform;
1112
using System.Collections;
1213
using UraniumUI.Controls;
1314

@@ -31,7 +32,7 @@ protected override AppCompatAutoCompleteTextView CreatePlatformView()
3132

3233
if (VirtualView != null)
3334
{
34-
autoComplete.SetTextColor(VirtualView.TextColor.ToAndroid());
35+
autoComplete.SetTextColor(VirtualView.TextColor.ToPlatform());
3536
}
3637

3738
return autoComplete;

src/UraniumUI/Handlers/AutoCompleteViewHandler.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public AutoCompleteViewHandler() : base(IconViewMapper)
2424
}
2525
}
2626

27-
#if (NET8_0) && !ANDROID && !IOS && !MACCATALYST && !WINDOWS
27+
#if (NET8_0 || NET9_0) && !ANDROID && !IOS && !MACCATALYST && !WINDOWS
2828
public partial class AutoCompleteViewHandler : ViewHandler<AutoCompleteView, object>
2929
{
3030
public AutoCompleteViewHandler(IPropertyMapper mapper, CommandMapper commandMapper = null) : base(IconViewMapper, commandMapper)

src/UraniumUI/Handlers/DropdownHandler.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public DropdownHandler() : base(DropdownPropertyMapper)
2222
}
2323
}
2424

25-
#if (NET8_0) && !ANDROID && !IOS && !MACCATALYST && !WINDOWS
25+
#if (NET8_0 || NET9_0) && !ANDROID && !IOS && !MACCATALYST && !WINDOWS
2626
public partial class DropdownHandler : ViewHandler<Dropdown, object>
2727
{
2828
public DropdownHandler(IPropertyMapper mapper, CommandMapper commandMapper = null) : base(DropdownPropertyMapper, commandMapper)

src/UraniumUI/Handlers/StatefulContentViewHandler.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private void ExecuteCommandIfCan(ICommand command)
4747
command.Execute(StatefulView.CommandParameter);
4848
}
4949
}
50-
#if NET8_0 && !ANDROID && !IOS && !MACCATALYST && !WINDOWS
50+
#if (NET8_0 || NET9_0) && !ANDROID && !IOS && !MACCATALYST && !WINDOWS
5151
public static void MapIsFocusable(StatefulContentViewHandler handler, StatefulContentView view)
5252
{
5353

src/UraniumUI/UraniumUI.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<Import Project="..\..\common.props" />
55

66
<PropertyGroup>
7-
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
8-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
7+
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst;net9.0;net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
8+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0;net9.0-windows10.0.19041.0</TargetFrameworks>
99
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
1010
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
1111
<UseMaui>true</UseMaui>

0 commit comments

Comments
 (0)