Skip to content

Commit 45d7d12

Browse files
Merge pull request #5 from SyncfusionExamples/DateTimeInVerticalAxes
Updated project version from .Net 6 to .Net 9.
2 parents 81f8c02 + 714d547 commit 45d7d12

29 files changed

+8260
-269
lines changed

DateTimeVerticalAxesDemo/App.xaml.cs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
namespace DateTimeVerticalAxesDemo;
2-
3-
public partial class App : Application
1+
namespace DateTimeVerticalAxesDemo
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 AppShell());
13+
}
14+
}
15+
}
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
namespace DateTimeVerticalAxesDemo;
2-
3-
public partial class AppShell : Shell
1+
namespace DateTimeVerticalAxesDemo
42
{
5-
public AppShell()
6-
{
7-
InitializeComponent();
8-
}
3+
public partial class AppShell : Shell
4+
{
5+
public AppShell()
6+
{
7+
InitializeComponent();
8+
}
9+
}
910
}

DateTimeVerticalAxesDemo/DateTimeVerticalAxesDemo.csproj

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

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

1726
<!-- App Identifier -->
1827
<ApplicationId>com.companyname.datetimeverticalaxesdemo</ApplicationId>
19-
<ApplicationIdGuid>CFEC021B-3811-46DD-9C47-2D43EDDA0639</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,9 @@
4960
</ItemGroup>
5061

5162
<ItemGroup>
52-
<PackageReference Include="Syncfusion.Maui.Core" Version="*" />
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="Syncfusion.Maui.Charts" Version="*" />
5466
</ItemGroup>
5567

5668
</Project>

DateTimeVerticalAxesDemo/DateTimeVerticalAxesDemo.csproj.user

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +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}") = "DateTimeVerticalAxesDemo", "DateTimeVerticalAxesDemo.csproj", "{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DateTimeVerticalAxesDemo", "DateTimeVerticalAxesDemo.csproj", "{3DDCEDA1-AF0E-4656-9170-BC78E7571216}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
1111
Release|Any CPU = Release|Any CPU
12-
Release-Xml|Any CPU = Release-Xml|Any CPU
1312
EndGlobalSection
1413
GlobalSection(ProjectConfigurationPlatforms) = postSolution
15-
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16-
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
17-
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
18-
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
19-
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Release|Any CPU.Build.0 = Release|Any CPU
20-
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Release|Any CPU.Deploy.0 = Release|Any CPU
21-
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Release-Xml|Any CPU.ActiveCfg = Release|Any CPU
22-
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Release-Xml|Any CPU.Build.0 = Release|Any CPU
23-
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Release-Xml|Any CPU.Deploy.0 = Release|Any CPU
14+
{3DDCEDA1-AF0E-4656-9170-BC78E7571216}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{3DDCEDA1-AF0E-4656-9170-BC78E7571216}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{3DDCEDA1-AF0E-4656-9170-BC78E7571216}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{3DDCEDA1-AF0E-4656-9170-BC78E7571216}.Release|Any CPU.Build.0 = Release|Any CPU
2418
EndGlobalSection
2519
GlobalSection(SolutionProperties) = preSolution
2620
HideSolutionNode = FALSE
2721
EndGlobalSection
2822
GlobalSection(ExtensibilityGlobals) = postSolution
29-
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
23+
SolutionGuid = {1AF5564A-F437-46D1-BDF3-58307F3428D1}
3024
EndGlobalSection
3125
EndGlobal
Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
namespace DateTimeVerticalAxesDemo;
2-
3-
public partial class MainPage : ContentPage
1+
namespace DateTimeVerticalAxesDemo
42
{
5-
public MainPage()
6-
{
7-
InitializeComponent();
8-
}
3+
public partial class MainPage : ContentPage
4+
{
5+
public MainPage()
6+
{
7+
InitializeComponent();
8+
}
99

10-
private void OnNumericalAxisLabelCreated(object sender, Syncfusion.Maui.Charts.ChartAxisLabelEventArgs e)
11-
{
12-
double value = Convert.ToDouble(e.Label);
13-
// Converting double value to its respective date time value.
14-
var date = DateTime.FromOADate(value);
10+
private void OnNumericalAxisLabelCreated(object sender, Syncfusion.Maui.Charts.ChartAxisLabelEventArgs e)
11+
{
12+
double value = Convert.ToDouble(e.Label);
13+
// Converting double value to its respective date time value.
14+
var date = DateTime.FromOADate(value);
1515

16-
// formatting date time string to display on the y-axis
17-
e.Label = String.Format("{0:hh:mm tt }", date);
18-
}
19-
}
16+
// formatting date time string to display on the y-axis
17+
e.Label = String.Format("{0:hh:mm tt }", date);
18+
}
19+
}
2020

21+
}
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 DateTimeVerticalAxesDemo;
1+
using Microsoft.Extensions.Logging;
2+
using Syncfusion.Maui.Core.Hosting;
33

4-
public static class MauiProgram
4+
namespace DateTimeVerticalAxesDemo
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
}

DateTimeVerticalAxesDemo/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 DateTimeVerticalAxesDemo;
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 DateTimeVerticalAxesDemo
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 DateTimeVerticalAxesDemo;
5-
6-
[Application]
7-
public class MainApplication : MauiApplication
4+
namespace DateTimeVerticalAxesDemo
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 DateTimeVerticalAxesDemo;
4-
5-
[Register("AppDelegate")]
6-
public class AppDelegate : MauiUIApplicationDelegate
3+
namespace DateTimeVerticalAxesDemo
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
}

0 commit comments

Comments
 (0)