Skip to content

Commit e8b30f3

Browse files
committed
updated sample with .net 9 version
1 parent cdd2f1b commit e8b30f3

35 files changed

+8725
-243
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.13.35931.197 d17.13
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ColumnChartDemo", "ColumnChartDemo\ColumnChartDemo.csproj", "{A23A1EE6-BB2E-484D-A5EC-D9672483D106}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{A23A1EE6-BB2E-484D-A5EC-D9672483D106}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{A23A1EE6-BB2E-484D-A5EC-D9672483D106}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{A23A1EE6-BB2E-484D-A5EC-D9672483D106}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{A23A1EE6-BB2E-484D-A5EC-D9672483D106}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {5916E353-723D-4C77-9851-C9122BE246FC}
24+
EndGlobalSection
25+
EndGlobal

Syncfusion_Dot_NET_MAUI_Column_Charts/ColumnChartDemo/App.xaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,12 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
44
xmlns:local="clr-namespace:ColumnChartDemo"
55
x:Class="ColumnChartDemo.App">
6-
6+
<Application.Resources>
7+
<ResourceDictionary>
8+
<ResourceDictionary.MergedDictionaries>
9+
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
10+
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
11+
</ResourceDictionary.MergedDictionaries>
12+
</ResourceDictionary>
13+
</Application.Resources>
714
</Application>
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
namespace ColumnChartDemo;
2-
3-
public partial class App : Application
1+
namespace ColumnChartDemo
42
{
5-
public App()
6-
{
7-
InitializeComponent();
3+
public partial class App : Application
4+
{
5+
public App()
6+
{
7+
InitializeComponent();
8+
}
89

9-
MainPage = new MainPage();
10-
}
11-
}
10+
protected override Window CreateWindow(IActivationState? activationState)
11+
{
12+
return new Window(new MainPage());
13+
}
14+
}
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<Shell
3+
x:Class="ColumnChartDemo.AppShell"
4+
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
5+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
6+
xmlns:local="clr-namespace:ColumnChartDemo"
7+
Shell.FlyoutBehavior="Flyout"
8+
Title="ColumnChartDemo">
9+
10+
<ShellContent
11+
Title="Home"
12+
ContentTemplate="{DataTemplate local:MainPage}"
13+
Route="MainPage" />
14+
15+
</Shell>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace ColumnChartDemo
2+
{
3+
public partial class AppShell : Shell
4+
{
5+
public AppShell()
6+
{
7+
InitializeComponent();
8+
}
9+
}
10+
}
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,56 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<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')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net6.0-windows10.0.19041</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>
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);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+
616
<OutputType>Exe</OutputType>
717
<RootNamespace>ColumnChartDemo</RootNamespace>
818
<UseMaui>true</UseMaui>
919
<SingleProject>true</SingleProject>
1020
<ImplicitUsings>enable</ImplicitUsings>
11-
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
21+
<Nullable>enable</Nullable>
1222

1323
<!-- Display name -->
1424
<ApplicationTitle>ColumnChartDemo</ApplicationTitle>
1525

1626
<!-- App Identifier -->
1727
<ApplicationId>com.companyname.columnchartdemo</ApplicationId>
18-
<ApplicationId Condition="$(TargetFramework.Contains('-windows'))">53E47BFF-2930-4C1B-BB86-E430AC84C899</ApplicationId>
1928

2029
<!-- Versions -->
2130
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
2231
<ApplicationVersion>1</ApplicationVersion>
2332

24-
<!-- Required for C# Hot Reload -->
25-
<UseInterpreter Condition="'$(Configuration)' == 'Debug'">True</UseInterpreter>
33+
<!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
34+
<WindowsPackageType>None</WindowsPackageType>
2635

27-
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-ios'">14.2</SupportedOSPlatformVersion>
28-
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-maccatalyst'">14.0</SupportedOSPlatformVersion>
29-
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-android'">21.0</SupportedOSPlatformVersion>
30-
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</SupportedOSPlatformVersion>
31-
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>
36+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
37+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
38+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
39+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
40+
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
41+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
3242
</PropertyGroup>
3343

3444
<ItemGroup>
3545
<!-- App Icon -->
36-
<MauiIcon Include="Resources\appicon.svg" ForegroundFile="Resources\appiconfg.svg" Color="#512BD4" />
46+
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
3747

3848
<!-- Splash Screen -->
39-
<MauiSplashScreen Include="Resources\appiconfg.svg" Color="#512BD4" BaseSize="128,128" />
49+
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
4050

4151
<!-- Images -->
4252
<MauiImage Include="Resources\Images\*" />
43-
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
53+
<MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" />
4454

4555
<!-- Custom Fonts -->
4656
<MauiFont Include="Resources\Fonts\*" />
@@ -49,19 +59,10 @@
4959
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
5060
</ItemGroup>
5161

52-
<ItemGroup Condition="$(TargetFramework.Contains('-windows'))">
53-
<!-- Required - WinUI does not yet have buildTransitive for everything -->
54-
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0" />
55-
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.0.0.30" />
56-
</ItemGroup>
57-
5862
<ItemGroup>
59-
<PackageReference Include="Syncfusion.Maui.Charts" Version="20.1.47-preview" />
63+
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
64+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
65+
<PackageReference Include="Syncfusion.Maui.Charts" Version="*" />
6066
</ItemGroup>
6167

62-
<PropertyGroup Condition="$(TargetFramework.Contains('-windows'))">
63-
<OutputType>WinExe</OutputType>
64-
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
65-
</PropertyGroup>
66-
6768
</Project>

Syncfusion_Dot_NET_MAUI_Column_Charts/ColumnChartDemo/ColumnChartDemo.csproj.user

-11
This file was deleted.

Syncfusion_Dot_NET_MAUI_Column_Charts/ColumnChartDemo/ColumnChartDemo.sln

-27
This file was deleted.

Syncfusion_Dot_NET_MAUI_Column_Charts/ColumnChartDemo/MainPage.xaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
xmlns:viewModel ="clr-namespace:ColumnChartDemo.ViewModel"
66
BackgroundColor="{DynamicResource PageBackgroundColor}">
77

8-
<Grid HorizontalOptions="FillAndExpand" Padding="20" BackgroundColor="White" VerticalOptions="FillAndExpand">
8+
<Grid HorizontalOptions="Fill" Padding="20" BackgroundColor="White" VerticalOptions="Fill">
99
<chart:SfCartesianChart>
1010
<chart:SfCartesianChart.BindingContext>
1111
<viewModel:ViewModel/>
1212
</chart:SfCartesianChart.BindingContext>
1313
<chart:SfCartesianChart.Title>
14-
<Label Text="Internet Users" Margin="5,10,5,10" HorizontalTextAlignment="Center" HorizontalOptions="FillAndExpand"></Label>
14+
<Label Text="Internet Users" Margin="5,10,5,10" HorizontalTextAlignment="Center" HorizontalOptions="Fill"></Label>
1515
</chart:SfCartesianChart.Title>
1616
<chart:SfCartesianChart.XAxes>
1717
<chart:CategoryAxis/>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3-
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31" />
43
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
54
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
5+
<uses-permission android:name="android.permission.INTERNET" />
66
</manifest>

Syncfusion_Dot_NET_MAUI_Column_Charts/ColumnChartDemo/Platforms/Android/MainActivity.cs

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

5-
namespace ColumnChartDemo;
6-
7-
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)]
8-
public class MainActivity : MauiAppCompatActivity
5+
namespace ColumnChartDemo
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
}
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
using Android.App;
22
using Android.Runtime;
33

4-
namespace ColumnChartDemo;
5-
6-
[Application]
7-
public class MainApplication : MauiApplication
4+
namespace ColumnChartDemo
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
}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
using Foundation;
22

3-
namespace ColumnChartDemo;
4-
5-
[Register("AppDelegate")]
6-
public class AppDelegate : MauiUIApplicationDelegate
3+
namespace ColumnChartDemo
74
{
8-
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
5+
[Register("AppDelegate")]
6+
public class AppDelegate : MauiUIApplicationDelegate
7+
{
8+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
9+
}
910
}
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+

Syncfusion_Dot_NET_MAUI_Column_Charts/ColumnChartDemo/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
@@ -1,15 +1,16 @@
11
using ObjCRuntime;
22
using UIKit;
33

4-
namespace ColumnChartDemo;
5-
6-
public class Program
4+
namespace ColumnChartDemo
75
{
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-
}
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+
}
1516
}
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 ColumnChartDemo
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+
}

0 commit comments

Comments
 (0)