Skip to content

Commit 5fb45c9

Browse files
Merge pull request #4 from SyncfusionExamples/update-sample-version
Update latest Net 10 sample
2 parents c670913 + 8145abc commit 5fb45c9

30 files changed

Lines changed: 321 additions & 303 deletions

Chart_GettingStarted/Chart_GettingStarted.sln

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Solution>
2+
<Project Path="Chart_GettingStarted/Chart_GettingStarted.csproj" />
3+
</Solution>
Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
namespace Chart_GettingStarted;
1+
using Microsoft.Extensions.DependencyInjection;
22

3-
public partial class App : Application
3+
namespace Chart_GettingStarted
44
{
5-
public App()
6-
{
7-
InitializeComponent();
5+
public partial class App : Application
6+
{
7+
public App()
8+
{
9+
InitializeComponent();
10+
}
811

9-
MainPage = new AppShell();
10-
}
11-
}
12+
protected override Window CreateWindow(IActivationState? activationState)
13+
{
14+
return new Window(new AppShell());
15+
}
16+
}
17+
}

Chart_GettingStarted/Chart_GettingStarted/AppShell.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
55
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
66
xmlns:local="clr-namespace:Chart_GettingStarted"
7-
Shell.FlyoutBehavior="Disabled">
7+
Title="Chart_GettingStarted">
88

99
<ShellContent
10+
Title="Home"
1011
ContentTemplate="{DataTemplate local:MainPage}"
1112
Route="MainPage" />
1213

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
namespace Chart_GettingStarted;
2-
3-
public partial class AppShell : Shell
1+
namespace Chart_GettingStarted
42
{
5-
public AppShell()
6-
{
7-
InitializeComponent();
8-
}
3+
public partial class AppShell : Shell
4+
{
5+
public AppShell()
6+
{
7+
InitializeComponent();
8+
}
9+
}
910
}
Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,50 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<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>
6-
<!-- 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> -->
4+
<TargetFrameworks>net10.0-android</TargetFrameworks>
5+
<TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('linux'))">$(TargetFrameworks);net10.0-ios;net10.0-maccatalyst</TargetFrameworks>
6+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net10.0-windows10.0.19041.0</TargetFrameworks>
7+
8+
<!-- Note for MacCatalyst:
9+
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
10+
When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
11+
The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
12+
either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
13+
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->
14+
815
<OutputType>Exe</OutputType>
916
<RootNamespace>Chart_GettingStarted</RootNamespace>
1017
<UseMaui>true</UseMaui>
1118
<SingleProject>true</SingleProject>
1219
<ImplicitUsings>enable</ImplicitUsings>
20+
<Nullable>enable</Nullable>
21+
22+
<!-- Enable XAML source generation for faster build times and improved performance.
23+
This generates C# code from XAML at compile time instead of runtime inflation.
24+
To disable, remove this line.
25+
For individual files, you can override by setting Inflator metadata:
26+
<MauiXaml Update="MyPage.xaml" Inflator="Default" /> (reverts to defaults: Runtime for Debug, XamlC for Release)
27+
<MauiXaml Update="MyPage.xaml" Inflator="Runtime" /> (force runtime inflation) -->
28+
<MauiXamlInflator>SourceGen</MauiXamlInflator>
1329

1430
<!-- Display name -->
1531
<ApplicationTitle>Chart_GettingStarted</ApplicationTitle>
1632

1733
<!-- App Identifier -->
1834
<ApplicationId>com.companyname.chart_gettingstarted</ApplicationId>
19-
<ApplicationIdGuid>58F2698D-4B4B-42FC-B779-3FAFA8421224</ApplicationIdGuid>
2035

2136
<!-- Versions -->
2237
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
2338
<ApplicationVersion>1</ApplicationVersion>
2439

25-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
26-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
40+
<!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
41+
<WindowsPackageType>None</WindowsPackageType>
42+
43+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
44+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
2745
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
2846
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
2947
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
30-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
3148
</PropertyGroup>
3249

3350
<ItemGroup>
@@ -39,8 +56,8 @@
3956

4057
<!-- Images -->
4158
<MauiImage Include="Resources\Images\*" />
42-
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
43-
59+
<MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" />
60+
4461
<!-- Custom Fonts -->
4562
<MauiFont Include="Resources\Fonts\*" />
4663

@@ -49,8 +66,13 @@
4966
</ItemGroup>
5067

5168
<ItemGroup>
52-
<PackageReference Include="Syncfusion.Maui.Charts" Version="*" />
53-
<PackageReference Include="Syncfusion.Maui.Core" Version="*" />
69+
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
70+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="10.0.0" />
71+
</ItemGroup>
72+
73+
<ItemGroup>
74+
<PackageReference Include="Syncfusion.Maui.Charts" Version="*" />
75+
<PackageReference Include="Syncfusion.Maui.Core" Version="*" />
5476
</ItemGroup>
5577

5678
</Project>

Chart_GettingStarted/Chart_GettingStarted/Chart_GettingStarted.csproj.user

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
1-
using Syncfusion.Maui.Core.Hosting;
2-
namespace Chart_GettingStarted;
1+
using Microsoft.Extensions.Logging;
2+
using Syncfusion.Maui.Core.Hosting;
33

4-
public static class MauiProgram
4+
namespace Chart_GettingStarted
55
{
6-
public static MauiApp CreateMauiApp()
7-
{
8-
var builder = MauiApp.CreateBuilder();
9-
builder
10-
.UseMauiApp<App>()
11-
.ConfigureSyncfusionCore()
12-
.ConfigureFonts(fonts =>
13-
{
14-
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
15-
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
16-
});
6+
public static class MauiProgram
7+
{
8+
public static MauiApp CreateMauiApp()
9+
{
10+
var builder = MauiApp.CreateBuilder();
11+
builder
12+
.UseMauiApp<App>()
13+
.ConfigureSyncfusionCore()
14+
.ConfigureFonts(fonts =>
15+
{
16+
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
17+
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
18+
});
1719

18-
return builder.Build();
19-
}
20+
#if DEBUG
21+
builder.Logging.AddDebug();
22+
#endif
23+
24+
return builder.Build();
25+
}
26+
}
2027
}

Chart_GettingStarted/Chart_GettingStarted/Platforms/Android/MainActivity.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
using Android.Content.PM;
33
using Android.OS;
44

5-
namespace Chart_GettingStarted;
6-
7-
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
8-
public class MainActivity : MauiAppCompatActivity
5+
namespace Chart_GettingStarted
96
{
7+
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
8+
public class MainActivity : MauiAppCompatActivity
9+
{
10+
}
1011
}
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
using Android.App;
22
using Android.Runtime;
33

4-
namespace Chart_GettingStarted;
5-
6-
[Application]
7-
public class MainApplication : MauiApplication
4+
namespace Chart_GettingStarted
85
{
9-
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
10-
: base(handle, ownership)
11-
{
12-
}
6+
[Application]
7+
public class MainApplication : MauiApplication
8+
{
9+
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
10+
: base(handle, ownership)
11+
{
12+
}
1313

14-
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
14+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
15+
}
1516
}

0 commit comments

Comments
 (0)