Skip to content

Updated Project sample with .Net 9 version. #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
16 changes: 7 additions & 9 deletions Complex_Binding/Complex_Binding.sln
Original file line number Diff line number Diff line change
@@ -1,27 +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}") = "Complex_Binding", "Complex_Binding\Complex_Binding.csproj", "{C4C1FFCA-E857-4E04-AAD3-7663A766D4CD}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Complex_Binding", "Complex_Binding\Complex_Binding.csproj", "{34DBBB23-B8D5-4048-9DF8-524557EB2B73}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C4C1FFCA-E857-4E04-AAD3-7663A766D4CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C4C1FFCA-E857-4E04-AAD3-7663A766D4CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4C1FFCA-E857-4E04-AAD3-7663A766D4CD}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{C4C1FFCA-E857-4E04-AAD3-7663A766D4CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C4C1FFCA-E857-4E04-AAD3-7663A766D4CD}.Release|Any CPU.Build.0 = Release|Any CPU
{C4C1FFCA-E857-4E04-AAD3-7663A766D4CD}.Release|Any CPU.Deploy.0 = Release|Any CPU
{34DBBB23-B8D5-4048-9DF8-524557EB2B73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{34DBBB23-B8D5-4048-9DF8-524557EB2B73}.Debug|Any CPU.Build.0 = Debug|Any CPU
{34DBBB23-B8D5-4048-9DF8-524557EB2B73}.Release|Any CPU.ActiveCfg = Release|Any CPU
{34DBBB23-B8D5-4048-9DF8-524557EB2B73}.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 = {14FDE28B-FF3C-4A6C-A8F9-5FEABFC8BA0F}
EndGlobalSection
EndGlobal
22 changes: 13 additions & 9 deletions Complex_Binding/Complex_Binding/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
namespace Complex_Binding;

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

MainPage = new AppShell();
}
}
protected override Window CreateWindow(IActivationState? activationState)
{
return new Window(new MainPage());
}
}
}
3 changes: 2 additions & 1 deletion Complex_Binding/Complex_Binding/AppShell.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Complex_Binding"
Shell.FlyoutBehavior="Disabled">
Shell.FlyoutBehavior="Flyout"
Title="Complex_Binding">

<ShellContent
Title="Home"
Expand Down
15 changes: 8 additions & 7 deletions Complex_Binding/Complex_Binding/AppShell.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
namespace Complex_Binding;

public partial class AppShell : Shell
namespace Complex_Binding
{
public AppShell()
{
InitializeComponent();
}
public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();
}
}
}
29 changes: 21 additions & 8 deletions Complex_Binding/Complex_Binding/Complex_Binding.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>Complex_Binding</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

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

<!-- App Identifier -->
<ApplicationId>com.companyname.complex_binding</ApplicationId>
<ApplicationIdGuid>5773A5DE-0598-450B-BF06-C8EB79B96B02</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,7 +60,9 @@
</ItemGroup>

<ItemGroup>
<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>
25 changes: 24 additions & 1 deletion Complex_Binding/Complex_Binding/Complex_Binding.csproj.user
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ActiveDebugFramework>net6.0-windows10.0.19041.0</ActiveDebugFramework>
<IsFirstTimeProjectOpen>False</IsFirstTimeProjectOpen>
<ActiveDebugFramework>net9.0-windows10.0.19041.0</ActiveDebugFramework>
<ActiveDebugProfile>Windows Machine</ActiveDebugProfile>
</PropertyGroup>
<ItemGroup>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Harsha-SF4223 remove user pro file

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed file

<None Update="App.xaml">
<SubType>Designer</SubType>
</None>
<None Update="AppShell.xaml">
<SubType>Designer</SubType>
</None>
<None Update="MainPage.xaml">
<SubType>Designer</SubType>
</None>
<None Update="Platforms\Windows\App.xaml">
<SubType>Designer</SubType>
</None>
<None Update="Platforms\Windows\Package.appxmanifest">
<SubType>Designer</SubType>
</None>
<None Update="Resources\Styles\Colors.xaml">
<SubType>Designer</SubType>
</None>
<None Update="Resources\Styles\Styles.xaml">
<SubType>Designer</SubType>
</None>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Complex_Binding/Complex_Binding/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ContentPage.BindingContext>
<local:ViewModel/>
</ContentPage.BindingContext>
<chart:SfCartesianChart>
<chart:SfCartesianChart Margin="0,10,0,0">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Harsha-SF4223 why added margin, share reason

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

legend overlapping with layout settings, for better UI visibility given margin.

<chart:SfCartesianChart.XAxes>
<chart:CategoryAxis>
<chart:CategoryAxis.Title>
Expand Down
40 changes: 23 additions & 17 deletions Complex_Binding/Complex_Binding/MauiProgram.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
using Syncfusion.Maui.Core.Hosting;
using Microsoft.Extensions.Logging;
using Syncfusion.Maui.Core.Hosting;

namespace Complex_Binding;

public static class MauiProgram
namespace Complex_Binding
{
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");
});

#if DEBUG
builder.Logging.AddDebug();
#endif

return builder.Build();
}
return builder.Build();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
using Android.Content.PM;
using Android.OS;

namespace Complex_Binding;

[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 Complex_Binding
{
[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
{
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
using Android.App;
using Android.Runtime;

namespace Complex_Binding;

[Application]
public class MainApplication : MauiApplication
namespace Complex_Binding
{
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();
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using Foundation;

namespace Complex_Binding;

[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
namespace Complex_Binding
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
}
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>

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 Complex_Binding/Complex_Binding/Platforms/MacCatalyst/Program.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
using ObjCRuntime;
using UIKit;

namespace Complex_Binding;

public class Program
namespace Complex_Binding
{
// 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 Complex_Binding/Complex_Binding/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 Complex_Binding;

class Program : MauiApplication
namespace Complex_Binding
{
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="Complex_Binding.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
<label>maui-application-title-placeholder</label>
Expand Down
Loading