Skip to content

Commit a5e72c4

Browse files
Merge pull request #2 from SyncfusionExamples/DottedLinechartSample
Updated Project sample with .Net 9 version.
2 parents c4c6c19 + 6856902 commit a5e72c4

30 files changed

+8250
-253
lines changed
Lines changed: 7 additions & 9 deletions
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.35931.197 d17.13
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DottedLinechartSample", "DottedLinechartSample\DottedLinechartSample.csproj", "{0D593BFB-2EC0-4644-B971-4ADC66320DCD}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DottedLinechartSample", "DottedLinechartSample\DottedLinechartSample.csproj", "{798BEFCE-9027-40B5-9EFF-06F10AB73A00}"
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-
{0D593BFB-2EC0-4644-B971-4ADC66320DCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{0D593BFB-2EC0-4644-B971-4ADC66320DCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{0D593BFB-2EC0-4644-B971-4ADC66320DCD}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
17-
{0D593BFB-2EC0-4644-B971-4ADC66320DCD}.Release|Any CPU.ActiveCfg = Release|Any CPU
18-
{0D593BFB-2EC0-4644-B971-4ADC66320DCD}.Release|Any CPU.Build.0 = Release|Any CPU
19-
{0D593BFB-2EC0-4644-B971-4ADC66320DCD}.Release|Any CPU.Deploy.0 = Release|Any CPU
14+
{798BEFCE-9027-40B5-9EFF-06F10AB73A00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{798BEFCE-9027-40B5-9EFF-06F10AB73A00}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{798BEFCE-9027-40B5-9EFF-06F10AB73A00}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{798BEFCE-9027-40B5-9EFF-06F10AB73A00}.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 = {2B26C2EE-4A07-4C76-A939-7FC2561FDC5B}
2624
EndGlobalSection
2725
EndGlobal
Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
namespace DottedLinechartSample;
2-
3-
public partial class App : Application
1+
namespace DottedLinechartSample
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 AppShell();
10-
}
11-
}
10+
protected override Window CreateWindow(IActivationState? activationState)
11+
{
12+
return new Window(new MainPage());
13+
}
14+
}
15+
}

DottedLinechartSample/DottedLinechartSample/AppShell.xaml

Lines changed: 2 additions & 1 deletion
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:DottedLinechartSample"
7-
Shell.FlyoutBehavior="Disabled">
7+
Shell.FlyoutBehavior="Flyout"
8+
Title="DottedLinechartSample">
89

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

DottedLinechartSample/DottedLinechartSample/DottedLinechartSample.csproj

Lines changed: 27 additions & 8 deletions
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>DottedLinechartSample</RootNamespace>
1018
<UseMaui>true</UseMaui>
1119
<SingleProject>true</SingleProject>
1220
<ImplicitUsings>enable</ImplicitUsings>
21+
<Nullable>enable</Nullable>
1322

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

1726
<!-- App Identifier -->
1827
<ApplicationId>com.companyname.dottedlinechartsample</ApplicationId>
19-
<ApplicationIdGuid>6a783cba-899a-4ab1-a68a-af3ae5b6c1f9</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,7 +60,15 @@
4960
</ItemGroup>
5061

5162
<ItemGroup>
52-
<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="Syncfusion.Maui.Charts" Version="*" />
66+
</ItemGroup>
67+
68+
<ItemGroup>
69+
<MauiXaml Update="MainPage.xaml">
70+
<Generator>MSBuild:Compile</Generator>
71+
</MauiXaml>
5372
</ItemGroup>
5473

5574
</Project>

DottedLinechartSample/DottedLinechartSample/DottedLinechartSample.csproj.user

Lines changed: 0 additions & 8 deletions
This file was deleted.

DottedLinechartSample/DottedLinechartSample/MainPage.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
xmlns:local="clr-namespace:DottedLinechartSample"
66
x:Class="DottedLinechartSample.MainPage">
77

8-
<chart:SfCartesianChart x:Name="chart" >
8+
<chart:SfCartesianChart x:Name="chart" Margin="0,10,0,0">
99

1010
<chart:SfCartesianChart.BindingContext>
1111
<local:ViewModel></local:ViewModel>
Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
1-
using Syncfusion.Maui.Core.Hosting;
2-
3-
namespace DottedLinechartSample;
4-
5-
public static class MauiProgram
1+
using Microsoft.Extensions.Logging;
2+
using Syncfusion.Maui.Core.Hosting;
3+
namespace DottedLinechartSample
64
{
7-
public static MauiApp CreateMauiApp()
8-
{
9-
var builder = MauiApp.CreateBuilder();
10-
builder
11-
.UseMauiApp<App>()
12-
.ConfigureSyncfusionCore()
13-
.ConfigureFonts(fonts =>
14-
{
15-
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
16-
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
17-
});
5+
public static class MauiProgram
6+
{
7+
public static MauiApp CreateMauiApp()
8+
{
9+
var builder = MauiApp.CreateBuilder();
10+
builder
11+
.UseMauiApp<App>()
12+
.ConfigureSyncfusionCore()
13+
.ConfigureFonts(fonts =>
14+
{
15+
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
16+
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
17+
});
18+
19+
#if DEBUG
20+
builder.Logging.AddDebug();
21+
#endif
1822

19-
return builder.Build();
20-
}
23+
return builder.Build();
24+
}
25+
}
2126
}

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

3-
namespace DottedLinechartSample;
4-
5-
[Register("AppDelegate")]
6-
public class AppDelegate : MauiUIApplicationDelegate
3+
namespace DottedLinechartSample
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
}
Lines changed: 14 additions & 0 deletions
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+

DottedLinechartSample/DottedLinechartSample/Platforms/MacCatalyst/Info.plist

Lines changed: 9 additions & 1 deletion
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>
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
using ObjCRuntime;
22
using UIKit;
33

4-
namespace DottedLinechartSample;
5-
6-
public class Program
4+
namespace DottedLinechartSample
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
}

DottedLinechartSample/DottedLinechartSample/Platforms/Tizen/Main.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
using Microsoft.Maui;
33
using Microsoft.Maui.Hosting;
44

5-
namespace DottedLinechartSample;
6-
7-
class Program : MauiApplication
5+
namespace DottedLinechartSample
86
{
9-
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
7+
internal class Program : MauiApplication
8+
{
9+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
1010

11-
static void Main(string[] args)
12-
{
13-
var app = new Program();
14-
app.Run(args);
15-
}
11+
static void Main(string[] args)
12+
{
13+
var app = new Program();
14+
app.Run(args);
15+
}
16+
}
1617
}

DottedLinechartSample/DottedLinechartSample/Platforms/Tizen/tizen-manifest.xml

Lines changed: 1 addition & 1 deletion
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="DottedLinechartSample.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
55
<label>maui-application-title-placeholder</label>

0 commit comments

Comments
 (0)