Skip to content

Commit 5d41e64

Browse files
committed
updated sample with .net 9 version
1 parent 4cca790 commit 5d41e64

35 files changed

+8742
-272
lines changed
Lines changed: 25 additions & 0 deletions
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}") = "LineChartDemo", "LineChartDemo\LineChartDemo.csproj", "{9071C2BB-CE18-44C3-8492-2494550AB0B9}"
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+
{9071C2BB-CE18-44C3-8492-2494550AB0B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{9071C2BB-CE18-44C3-8492-2494550AB0B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{9071C2BB-CE18-44C3-8492-2494550AB0B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{9071C2BB-CE18-44C3-8492-2494550AB0B9}.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 = {38716209-0CBD-44BA-9B23-206E27EA158E}
24+
EndGlobalSection
25+
EndGlobal

Syncfusion_Dot_NET_MAUI_Line_Charts/LineChartDemo/App.xaml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,10 @@
55
x:Class="LineChartDemo.App">
66
<Application.Resources>
77
<ResourceDictionary>
8-
9-
<Color x:Key="PrimaryColor">#512bdf</Color>
10-
<Color x:Key="SecondaryColor">White</Color>
11-
12-
<Style TargetType="Label">
13-
<Setter Property="TextColor" Value="{DynamicResource PrimaryColor}" />
14-
<Setter Property="FontFamily" Value="OpenSansRegular" />
15-
</Style>
16-
17-
<Style TargetType="Button">
18-
<Setter Property="TextColor" Value="{DynamicResource SecondaryColor}" />
19-
<Setter Property="FontFamily" Value="OpenSansRegular" />
20-
<Setter Property="BackgroundColor" Value="{DynamicResource PrimaryColor}" />
21-
<Setter Property="Padding" Value="14,10" />
22-
</Style>
23-
8+
<ResourceDictionary.MergedDictionaries>
9+
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
10+
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
11+
</ResourceDictionary.MergedDictionaries>
2412
</ResourceDictionary>
2513
</Application.Resources>
2614
</Application>
Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
namespace LineChartDemo;
2-
3-
public partial class App : Application
1+
namespace LineChartDemo
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+
}
Lines changed: 15 additions & 0 deletions
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="LineChartDemo.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:LineChartDemo"
7+
Shell.FlyoutBehavior="Flyout"
8+
Title="LineChartDemo">
9+
10+
<ShellContent
11+
Title="Home"
12+
ContentTemplate="{DataTemplate local:MainPage}"
13+
Route="MainPage" />
14+
15+
</Shell>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace LineChartDemo
2+
{
3+
public partial class AppShell : Shell
4+
{
5+
public AppShell()
6+
{
7+
InitializeComponent();
8+
}
9+
}
10+
}
Lines changed: 28 additions & 27 deletions
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>LineChartDemo</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>LineChartDemo</ApplicationTitle>
1525

1626
<!-- App Identifier -->
1727
<ApplicationId>com.companyname.linechartdemo</ApplicationId>
18-
<ApplicationId Condition="$(TargetFramework.Contains('-windows'))">C5295348-D48E-4245-947D-2F945D234020</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_Line_Charts/LineChartDemo/LineChartDemo.csproj.user

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

Syncfusion_Dot_NET_MAUI_Line_Charts/LineChartDemo/LineChartDemo.sln

Lines changed: 0 additions & 27 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;
1+
using Microsoft.Extensions.Logging;
2+
using Syncfusion.Maui.Core.Hosting;
23

3-
namespace LineChartDemo;
4-
5-
public static class MauiProgram
4+
namespace LineChartDemo
65
{
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-
});
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+
});
19+
20+
#if DEBUG
21+
builder.Logging.AddDebug();
22+
#endif
1723

18-
return builder.Build();
19-
}
24+
return builder.Build();
25+
}
26+
}
2027
}
Lines changed: 1 addition & 1 deletion
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>

0 commit comments

Comments
 (0)