Skip to content

Commit 5d77daf

Browse files
Merge pull request #5 from SyncfusionExamples/change_target_framework
Update the .NET Version 9
2 parents 76178c1 + 87ca3da commit 5d77daf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+8322
-315
lines changed

MAUI_Chart_JSON_Data/App.xaml.cs

-11
This file was deleted.

MAUI_Chart_JSON_Data/AppShell.xaml.cs

-9
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
4-
VisualStudioVersion = 17.0.31611.283
4+
VisualStudioVersion = 17.13.35919.96 d17.13
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MAUI_Chart_JSON_Data", "MAUI_Chart_JSON_Data.csproj", "{880BB72B-24BE-403B-B01D-36E2A7F9A088}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MAUI_Chart_JSON_Data", "MAUI_Chart_JSON_Data\MAUI_Chart_JSON_Data.csproj", "{D272ECFD-031E-40C8-A52A-23BDE7E04E79}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
1111
Release|Any CPU = Release|Any CPU
1212
EndGlobalSection
1313
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{880BB72B-24BE-403B-B01D-36E2A7F9A088}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{880BB72B-24BE-403B-B01D-36E2A7F9A088}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{880BB72B-24BE-403B-B01D-36E2A7F9A088}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
17-
{880BB72B-24BE-403B-B01D-36E2A7F9A088}.Release|Any CPU.ActiveCfg = Release|Any CPU
18-
{880BB72B-24BE-403B-B01D-36E2A7F9A088}.Release|Any CPU.Build.0 = Release|Any CPU
19-
{880BB72B-24BE-403B-B01D-36E2A7F9A088}.Release|Any CPU.Deploy.0 = Release|Any CPU
14+
{D272ECFD-031E-40C8-A52A-23BDE7E04E79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{D272ECFD-031E-40C8-A52A-23BDE7E04E79}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{D272ECFD-031E-40C8-A52A-23BDE7E04E79}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{D272ECFD-031E-40C8-A52A-23BDE7E04E79}.Release|Any CPU.Build.0 = Release|Any CPU
2018
EndGlobalSection
2119
GlobalSection(SolutionProperties) = preSolution
2220
HideSolutionNode = FALSE
2321
EndGlobalSection
2422
GlobalSection(ExtensibilityGlobals) = postSolution
25-
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
23+
SolutionGuid = {1EEC63BF-CA47-4572-9F7D-7FC38AF8F18D}
2624
EndGlobalSection
2725
EndGlobal
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
namespace MAUI_Chart_JSON_Data
2+
{
3+
public partial class App : Application
4+
{
5+
public App()
6+
{
7+
InitializeComponent();
8+
}
9+
10+
protected override Window CreateWindow(IActivationState? activationState)
11+
{
12+
return new Window(new AppShell());
13+
}
14+
}
15+
}

MAUI_Chart_JSON_Data/AppShell.xaml renamed to MAUI_Chart_JSON_Data/MAUI_Chart_JSON_Data/AppShell.xaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
55
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
66
xmlns:local="clr-namespace:MAUI_Chart_JSON_Data"
7-
Shell.FlyoutBehavior="Disabled">
7+
Shell.FlyoutBehavior="Flyout"
8+
Title="MAUI_Chart_JSON_Data">
89

910
<ShellContent
1011
Title="Home"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace MAUI_Chart_JSON_Data
2+
{
3+
public partial class AppShell : Shell
4+
{
5+
public AppShell()
6+
{
7+
InitializeComponent();
8+
}
9+
}
10+
}

MAUI_Chart_JSON_Data/MAUI_Chart_JSON_Data.csproj renamed to MAUI_Chart_JSON_Data/MAUI_Chart_JSON_Data/MAUI_Chart_JSON_Data.csproj

+22-9
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,40 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
5-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.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);net6.0-tizen</TargetFrameworks> -->
7+
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->
8+
9+
<!-- Note for MacCatalyst:
10+
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
11+
When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
12+
The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
13+
either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
14+
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->
15+
816
<OutputType>Exe</OutputType>
917
<RootNamespace>MAUI_Chart_JSON_Data</RootNamespace>
1018
<UseMaui>true</UseMaui>
1119
<SingleProject>true</SingleProject>
1220
<ImplicitUsings>enable</ImplicitUsings>
21+
<Nullable>enable</Nullable>
1322

1423
<!-- Display name -->
1524
<ApplicationTitle>MAUI_Chart_JSON_Data</ApplicationTitle>
1625

1726
<!-- App Identifier -->
1827
<ApplicationId>com.companyname.maui_chart_json_data</ApplicationId>
19-
<ApplicationIdGuid>737cff82-cea7-4532-9183-172a96d3cbaa</ApplicationIdGuid>
2028

2129
<!-- Versions -->
2230
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
2331
<ApplicationVersion>1</ApplicationVersion>
2432

25-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
26-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
33+
<!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
34+
<WindowsPackageType>None</WindowsPackageType>
35+
36+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
37+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
2738
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
2839
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
2940
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
@@ -39,7 +50,7 @@
3950

4051
<!-- Images -->
4152
<MauiImage Include="Resources\Images\*" />
42-
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
53+
<MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" />
4354

4455
<!-- Custom Fonts -->
4556
<MauiFont Include="Resources\Fonts\*" />
@@ -49,8 +60,10 @@
4960
</ItemGroup>
5061

5162
<ItemGroup>
52-
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
53-
<PackageReference Include="Syncfusion.Maui.Charts" Version="*" />
63+
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
64+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
65+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
66+
<PackageReference Include="Syncfusion.Maui.Charts" Version="*" />
5467
</ItemGroup>
5568

5669
</Project>

MAUI_Chart_JSON_Data/MainPage.xaml renamed to MAUI_Chart_JSON_Data/MAUI_Chart_JSON_Data/MainPage.xaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
44
xmlns:chart="clr-namespace:Syncfusion.Maui.Charts;assembly=Syncfusion.Maui.Charts"
55
x:Class="MAUI_Chart_JSON_Data.MainPage">
6+
67
<Grid>
78
<chart:SfCartesianChart x:Name="chart">
89
<chart:SfCartesianChart.XAxes>
@@ -22,9 +23,10 @@
2223
</chart:SfCartesianChart.YAxes>
2324

2425
<chart:ColumnSeries ItemsSource="{Binding Medal}"
25-
XBindingPath="Country"
26-
YBindingPath="Count">
26+
XBindingPath="Country"
27+
YBindingPath="Count">
2728
</chart:ColumnSeries>
2829
</chart:SfCartesianChart>
2930
</Grid>
31+
3032
</ContentPage>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+

2+
using Newtonsoft.Json;
3+
4+
namespace MAUI_Chart_JSON_Data
5+
{
6+
public partial class MainPage : ContentPage
7+
{
8+
public MainPage()
9+
{
10+
InitializeComponent();
11+
string jsonData = @"{'Medal':[{'Country':'USA','Count':46},{'Country':'China','Count':36},{'Country':'Japan','Count':63},{'Country':'Australia','Count':54},{'Country':'France','Count':50}]}";
12+
13+
var jsonDataCollection = JsonConvert.DeserializeObject<ViewModel>(jsonData);
14+
chart.BindingContext = jsonDataCollection;
15+
}
16+
17+
}
18+
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using Microsoft.Extensions.Logging;
2+
using Syncfusion.Maui.Core.Hosting;
3+
4+
namespace MAUI_Chart_JSON_Data
5+
{
6+
public static class MauiProgram
7+
{
8+
public static MauiApp CreateMauiApp()
9+
{
10+
var builder = MauiApp.CreateBuilder();
11+
builder.ConfigureSyncfusionCore();
12+
builder
13+
.UseMauiApp<App>()
14+
.ConfigureFonts(fonts =>
15+
{
16+
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
17+
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
18+
});
19+
20+
#if DEBUG
21+
builder.Logging.AddDebug();
22+
#endif
23+
24+
return builder.Build();
25+
}
26+
}
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using Android.App;
2+
using Android.Content.PM;
3+
using Android.OS;
4+
5+
namespace MAUI_Chart_JSON_Data
6+
{
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+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using Android.App;
2+
using Android.Runtime;
3+
4+
namespace MAUI_Chart_JSON_Data
5+
{
6+
[Application]
7+
public class MainApplication : MauiApplication
8+
{
9+
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
10+
: base(handle, ownership)
11+
{
12+
}
13+
14+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Foundation;
2+
3+
namespace MAUI_Chart_JSON_Data
4+
{
5+
[Register("AppDelegate")]
6+
public class AppDelegate : MauiUIApplicationDelegate
7+
{
8+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
9+
}
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<!-- See https://aka.ms/maui-publish-app-store#add-entitlements for more information about adding entitlements.-->
5+
<dict>
6+
<!-- App Sandbox must be enabled to distribute a MacCatalyst app through the Mac App Store. -->
7+
<key>com.apple.security.app-sandbox</key>
8+
<true/>
9+
<!-- When App Sandbox is enabled, this value is required to open outgoing network connections. -->
10+
<key>com.apple.security.network.client</key>
11+
<true/>
12+
</dict>
13+
</plist>
14+

MAUI_Chart_JSON_Data/Platforms/MacCatalyst/Info.plist renamed to MAUI_Chart_JSON_Data/MAUI_Chart_JSON_Data/Platforms/MacCatalyst/Info.plist

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<!-- The Mac App Store requires you specify if the app uses encryption. -->
6+
<!-- Please consult https://developer.apple.com/documentation/bundleresources/information_property_list/itsappusesnonexemptencryption -->
7+
<!-- <key>ITSAppUsesNonExemptEncryption</key> -->
8+
<!-- Please indicate <true/> or <false/> here. -->
9+
10+
<!-- Specify the category for your app here. -->
11+
<!-- Please consult https://developer.apple.com/documentation/bundleresources/information_property_list/lsapplicationcategorytype -->
12+
<!-- <key>LSApplicationCategoryType</key> -->
13+
<!-- <string>public.app-category.YOUR-CATEGORY-HERE</string> -->
514
<key>UIDeviceFamily</key>
615
<array>
7-
<integer>1</integer>
816
<integer>2</integer>
917
</array>
1018
<key>UIRequiredDeviceCapabilities</key>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using ObjCRuntime;
2+
using UIKit;
3+
4+
namespace MAUI_Chart_JSON_Data
5+
{
6+
public class Program
7+
{
8+
// This is the main entry point of the application.
9+
static void Main(string[] args)
10+
{
11+
// if you want to use a different Application Delegate class from "AppDelegate"
12+
// you can specify it here.
13+
UIApplication.Main(args, null, typeof(AppDelegate));
14+
}
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using Microsoft.Maui;
3+
using Microsoft.Maui.Hosting;
4+
5+
namespace MAUI_Chart_JSON_Data
6+
{
7+
internal class Program : MauiApplication
8+
{
9+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
10+
11+
static void Main(string[] args)
12+
{
13+
var app = new Program();
14+
app.Run(args);
15+
}
16+
}
17+
}

MAUI_Chart_JSON_Data/Platforms/Tizen/tizen-manifest.xml renamed to MAUI_Chart_JSON_Data/MAUI_Chart_JSON_Data/Platforms/Tizen/tizen-manifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest package="maui-application-id-placeholder" version="0.0.0" api-version="7" xmlns="http://tizen.org/ns/packages">
2+
<manifest package="maui-application-id-placeholder" version="0.0.0" api-version="9" xmlns="http://tizen.org/ns/packages">
33
<profile name="common" />
44
<ui-application appid="maui-application-id-placeholder" exec="MAUI_Chart_JSON_Data.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
55
<label>maui-application-title-placeholder</label>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using Microsoft.UI.Xaml;
2+
3+
// To learn more about WinUI, the WinUI project structure,
4+
// and more about our project templates, see: http://aka.ms/winui-project-info.
5+
6+
namespace MAUI_Chart_JSON_Data.WinUI
7+
{
8+
/// <summary>
9+
/// Provides application-specific behavior to supplement the default Application class.
10+
/// </summary>
11+
public partial class App : MauiWinUIApplication
12+
{
13+
/// <summary>
14+
/// Initializes the singleton application object. This is the first line of authored code
15+
/// executed, and as such is the logical equivalent of main() or WinMain().
16+
/// </summary>
17+
public App()
18+
{
19+
this.InitializeComponent();
20+
}
21+
22+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
23+
}
24+
25+
}

MAUI_Chart_JSON_Data/Platforms/Windows/Package.appxmanifest renamed to MAUI_Chart_JSON_Data/MAUI_Chart_JSON_Data/Platforms/Windows/Package.appxmanifest

+3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
<Package
33
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
44
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
5+
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
56
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
67
IgnorableNamespaces="uap rescap">
78

89
<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" />
910

11+
<mp:PhoneIdentity PhoneProductId="AF4B5876-6F34-4F73-B67E-7A191985BFA3" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
12+
1013
<Properties>
1114
<DisplayName>$placeholder$</DisplayName>
1215
<PublisherDisplayName>User Name</PublisherDisplayName>

0 commit comments

Comments
 (0)