Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions DateTimeVerticalAxesDemo/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
namespace DateTimeVerticalAxesDemo;

public partial class App : Application
namespace DateTimeVerticalAxesDemo
{
public App()
{
InitializeComponent();
public partial class App : Application
{
public App()
{
InitializeComponent();
}

MainPage = new AppShell();
}
}
protected override Window CreateWindow(IActivationState? activationState)
{
return new Window(new AppShell());
}
}
}
15 changes: 8 additions & 7 deletions DateTimeVerticalAxesDemo/AppShell.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
namespace DateTimeVerticalAxesDemo;

public partial class AppShell : Shell
namespace DateTimeVerticalAxesDemo
{
public AppShell()
{
InitializeComponent();
}
public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();
}
}
}
30 changes: 21 additions & 9 deletions DateTimeVerticalAxesDemo/DateTimeVerticalAxesDemo.csproj
Original file line number Diff line number Diff line change
@@ -1,29 +1,40 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->

<!-- Note for MacCatalyst:
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->

<OutputType>Exe</OutputType>
<RootNamespace>DateTimeVerticalAxesDemo</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<!-- Display name -->
<ApplicationTitle>DateTimeVerticalAxesDemo</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>com.companyname.datetimeverticalaxesdemo</ApplicationId>
<ApplicationIdGuid>CFEC021B-3811-46DD-9C47-2D43EDDA0639</ApplicationIdGuid>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
<WindowsPackageType>None</WindowsPackageType>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
Expand All @@ -39,7 +50,7 @@

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

<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
Expand All @@ -49,8 +60,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.Maui.Core" Version="*" />
<PackageReference Include="Syncfusion.Maui.Charts" Version="*" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
<PackageReference Include="Syncfusion.Maui.Charts" Version="*" />
</ItemGroup>

</Project>
8 changes: 0 additions & 8 deletions DateTimeVerticalAxesDemo/DateTimeVerticalAxesDemo.csproj.user

This file was deleted.

20 changes: 7 additions & 13 deletions DateTimeVerticalAxesDemo/DateTimeVerticalAxesDemo.sln
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31611.283
VisualStudioVersion = 17.13.35931.197 d17.13
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DateTimeVerticalAxesDemo", "DateTimeVerticalAxesDemo.csproj", "{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DateTimeVerticalAxesDemo", "DateTimeVerticalAxesDemo.csproj", "{3DDCEDA1-AF0E-4656-9170-BC78E7571216}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Release-Xml|Any CPU = Release-Xml|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Release|Any CPU.Build.0 = Release|Any CPU
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Release|Any CPU.Deploy.0 = Release|Any CPU
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Release-Xml|Any CPU.ActiveCfg = Release|Any CPU
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Release-Xml|Any CPU.Build.0 = Release|Any CPU
{4B7F4ED4-94EB-43AC-98FA-2DE0315891DA}.Release-Xml|Any CPU.Deploy.0 = Release|Any CPU
{3DDCEDA1-AF0E-4656-9170-BC78E7571216}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3DDCEDA1-AF0E-4656-9170-BC78E7571216}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3DDCEDA1-AF0E-4656-9170-BC78E7571216}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3DDCEDA1-AF0E-4656-9170-BC78E7571216}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
SolutionGuid = {1AF5564A-F437-46D1-BDF3-58307F3428D1}
EndGlobalSection
EndGlobal
33 changes: 17 additions & 16 deletions DateTimeVerticalAxesDemo/MainPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
namespace DateTimeVerticalAxesDemo;

public partial class MainPage : ContentPage
namespace DateTimeVerticalAxesDemo
{
public MainPage()
{
InitializeComponent();
}
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}

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

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

}
39 changes: 23 additions & 16 deletions DateTimeVerticalAxesDemo/MauiProgram.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
using Syncfusion.Maui.Core.Hosting;
namespace DateTimeVerticalAxesDemo;
using Microsoft.Extensions.Logging;
using Syncfusion.Maui.Core.Hosting;

public static class MauiProgram
namespace DateTimeVerticalAxesDemo
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureSyncfusionCore()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureSyncfusionCore()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});

return builder.Build();
}
#if DEBUG
builder.Logging.AddDebug();
#endif

return builder.Build();
}
}
}
9 changes: 5 additions & 4 deletions DateTimeVerticalAxesDemo/Platforms/Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
using Android.Content.PM;
using Android.OS;

namespace DateTimeVerticalAxesDemo;

[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
namespace DateTimeVerticalAxesDemo
{
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
{
}
}
19 changes: 10 additions & 9 deletions DateTimeVerticalAxesDemo/Platforms/Android/MainApplication.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
using Android.App;
using Android.Runtime;

namespace DateTimeVerticalAxesDemo;

[Application]
public class MainApplication : MauiApplication
namespace DateTimeVerticalAxesDemo
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{
}
[Application]
public class MainApplication : MauiApplication
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{
}

protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
}
11 changes: 6 additions & 5 deletions DateTimeVerticalAxesDemo/Platforms/MacCatalyst/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using Foundation;

namespace DateTimeVerticalAxesDemo;

[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
namespace DateTimeVerticalAxesDemo
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
}
14 changes: 14 additions & 0 deletions DateTimeVerticalAxesDemo/Platforms/MacCatalyst/Entitlements.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!-- See https://aka.ms/maui-publish-app-store#add-entitlements for more information about adding entitlements.-->
<dict>
<!-- App Sandbox must be enabled to distribute a MacCatalyst app through the Mac App Store. -->
<key>com.apple.security.app-sandbox</key>
<true/>
<!-- When App Sandbox is enabled, this value is required to open outgoing network connections. -->
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist>

10 changes: 9 additions & 1 deletion DateTimeVerticalAxesDemo/Platforms/MacCatalyst/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- The Mac App Store requires you specify if the app uses encryption. -->
<!-- Please consult https://developer.apple.com/documentation/bundleresources/information_property_list/itsappusesnonexemptencryption -->
<!-- <key>ITSAppUsesNonExemptEncryption</key> -->
<!-- Please indicate <true/> or <false/> here. -->

<!-- Specify the category for your app here. -->
<!-- Please consult https://developer.apple.com/documentation/bundleresources/information_property_list/lsapplicationcategorytype -->
<!-- <key>LSApplicationCategoryType</key> -->
<!-- <string>public.app-category.YOUR-CATEGORY-HERE</string> -->
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
Expand Down
21 changes: 11 additions & 10 deletions DateTimeVerticalAxesDemo/Platforms/MacCatalyst/Program.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
using ObjCRuntime;
using UIKit;

namespace DateTimeVerticalAxesDemo;

public class Program
namespace DateTimeVerticalAxesDemo
{
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, typeof(AppDelegate));
}
public class Program
{
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, typeof(AppDelegate));
}
}
}
19 changes: 10 additions & 9 deletions DateTimeVerticalAxesDemo/Platforms/Tizen/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
using Microsoft.Maui;
using Microsoft.Maui.Hosting;

namespace DateTimeVerticalAxesDemo;

class Program : MauiApplication
namespace DateTimeVerticalAxesDemo
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
internal class Program : MauiApplication
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();

static void Main(string[] args)
{
var app = new Program();
app.Run(args);
}
static void Main(string[] args)
{
var app = new Program();
app.Run(args);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="maui-application-id-placeholder" version="0.0.0" api-version="7" xmlns="http://tizen.org/ns/packages">
<manifest package="maui-application-id-placeholder" version="0.0.0" api-version="9" xmlns="http://tizen.org/ns/packages">
<profile name="common" />
<ui-application appid="maui-application-id-placeholder" exec="DateTimeVerticalAxesDemo.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
<label>maui-application-title-placeholder</label>
Expand Down
Loading