├── .github
└── FUNDING.yml
├── MauiForCars
├── MauiForCars
│ ├── Resources
│ │ ├── Fonts
│ │ │ ├── OpenSans-Regular.ttf
│ │ │ └── OpenSans-Semibold.ttf
│ │ ├── AppIcon
│ │ │ ├── appicon.svg
│ │ │ └── appiconfg.svg
│ │ ├── Raw
│ │ │ └── AboutAssets.txt
│ │ ├── Splash
│ │ │ └── splash.svg
│ │ ├── Styles
│ │ │ ├── Colors.xaml
│ │ │ └── Styles.xaml
│ │ └── Images
│ │ │ └── dotnet_bot.svg
│ ├── Platforms
│ │ ├── Android
│ │ │ ├── Resources
│ │ │ │ ├── xml
│ │ │ │ │ └── automotive_app_desc.xml
│ │ │ │ └── values
│ │ │ │ │ └── colors.xml
│ │ │ ├── AndroidAuto
│ │ │ │ ├── Enums
│ │ │ │ │ └── AAScreen.cs
│ │ │ │ ├── Sessions
│ │ │ │ │ └── AASession.cs
│ │ │ │ ├── Listeners
│ │ │ │ │ ├── ActionOnClickListener.cs
│ │ │ │ │ └── NavigationOnClickListener.cs
│ │ │ │ ├── Services
│ │ │ │ │ └── AACarAppService.cs
│ │ │ │ └── Screens
│ │ │ │ │ ├── AAScreenMessageTemplate.cs
│ │ │ │ │ ├── AAScreenMenu.cs
│ │ │ │ │ ├── AAScreenGridTemplate.cs
│ │ │ │ │ └── AAScreenPaneTemplate.cs
│ │ │ ├── MainApplication.cs
│ │ │ ├── MainActivity.cs
│ │ │ └── AndroidManifest.xml
│ │ ├── iOS
│ │ │ ├── AppDelegate.cs
│ │ │ ├── Entitlements.plist
│ │ │ ├── DeviceSceneDelegate.cs
│ │ │ ├── Program.cs
│ │ │ ├── Info.plist
│ │ │ └── CarPlaySceneDelegate.cs
│ │ ├── MacCatalyst
│ │ │ ├── AppDelegate.cs
│ │ │ ├── Program.cs
│ │ │ └── Info.plist
│ │ ├── Windows
│ │ │ ├── App.xaml
│ │ │ ├── app.manifest
│ │ │ ├── App.xaml.cs
│ │ │ └── Package.appxmanifest
│ │ └── Tizen
│ │ │ ├── Main.cs
│ │ │ └── tizen-manifest.xml
│ ├── AppShell.xaml.cs
│ ├── Properties
│ │ └── launchSettings.json
│ ├── App.xaml.cs
│ ├── AppShell.xaml
│ ├── MainPage.xaml.cs
│ ├── MauiProgram.cs
│ ├── App.xaml
│ ├── MainPage.xaml
│ └── MauiForCars.csproj
└── MauiForCars.sln
├── Scripts
└── RunAndroidAuto.bat
├── README.md
├── .gitignore
└── LICENSE
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: christian-strydom
2 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Resources/Fonts/OpenSans-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/christian-strydom/MauiForCars/HEAD/MauiForCars/MauiForCars/Resources/Fonts/OpenSans-Regular.ttf
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Resources/Fonts/OpenSans-Semibold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/christian-strydom/MauiForCars/HEAD/MauiForCars/MauiForCars/Resources/Fonts/OpenSans-Semibold.ttf
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Android/Resources/xml/automotive_app_desc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/AppShell.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace MauiForCars;
2 |
3 | public partial class AppShell : Shell
4 | {
5 | public AppShell()
6 | {
7 | InitializeComponent();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "Windows Machine": {
4 | "commandName": "MsixPackage",
5 | "nativeDebugging": false
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/App.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace MauiForCars;
2 |
3 | public partial class App : Application
4 | {
5 | public App()
6 | {
7 | InitializeComponent();
8 |
9 | MainPage = new AppShell();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Resources/AppIcon/appicon.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Android/Resources/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #512BD4
4 | #2B0B98
5 | #2B0B98
6 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 |
3 | namespace MauiForCars;
4 |
5 | [Register("AppDelegate")]
6 | public class AppDelegate : MauiUIApplicationDelegate
7 | {
8 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
9 | }
10 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/MacCatalyst/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 |
3 | namespace MauiForCars;
4 |
5 | [Register("AppDelegate")]
6 | public class AppDelegate : MauiUIApplicationDelegate
7 | {
8 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
9 | }
10 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.developer.carplay-driving-task
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Android/AndroidAuto/Enums/AAScreen.cs:
--------------------------------------------------------------------------------
1 | namespace MauiForCars.Platforms.Android.AndroidAuto.Enums
2 | {
3 | public enum AAScreen
4 | {
5 | None = 0,
6 | Menu = 1,
7 | MessageTemplate = 2,
8 | PaneTemplate = 3,
9 | GridTemplate = 4,
10 | Pop = 5,
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Windows/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Scripts/RunAndroidAuto.bat:
--------------------------------------------------------------------------------
1 | : https://cvstrydom.co.za
2 | : This script forwards your ADB port and launches the Android Auto Desktop Head Unit if it's installed in the default location
3 | : Be sure to start the head unit server on your Android phone first
4 | adb forward tcp:5277 tcp:5277
5 | start "" "%USERPROFILE%\AppData\Local\Android\Sdk\extras\google\auto\desktop-head-unit.exe"
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Tizen/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.Maui;
3 | using Microsoft.Maui.Hosting;
4 |
5 | namespace MauiForCars;
6 |
7 | class Program : MauiApplication
8 | {
9 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
10 |
11 | static void Main(string[] args)
12 | {
13 | var app = new Program();
14 | app.Run(args);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/iOS/DeviceSceneDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace MauiCarApp.Platforms.iOS
9 | {
10 | [Register("DeviceSceneDelegate")]
11 | public class DeviceSceneDelegate : MauiUISceneDelegate
12 | {
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Android/MainApplication.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.Runtime;
3 |
4 | namespace MauiForCars;
5 |
6 | [Application]
7 | public class MainApplication : MauiApplication
8 | {
9 | public MainApplication(IntPtr handle, JniHandleOwnership ownership)
10 | : base(handle, ownership)
11 | {
12 | }
13 |
14 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
15 | }
16 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/iOS/Program.cs:
--------------------------------------------------------------------------------
1 | using ObjCRuntime;
2 | using UIKit;
3 |
4 | namespace MauiForCars;
5 |
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 | }
16 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/MacCatalyst/Program.cs:
--------------------------------------------------------------------------------
1 | using ObjCRuntime;
2 | using UIKit;
3 |
4 | namespace MauiForCars;
5 |
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 | }
16 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Android/AndroidAuto/Sessions/AASession.cs:
--------------------------------------------------------------------------------
1 | using Android.Content;
2 | using AndroidX.Car.App;
3 | using MauiForCars.Platforms.Android.AndroidAuto.Screens;
4 |
5 | namespace MauiForCars.Platforms.Android.AndroidAuto.Sessions
6 | {
7 | public class AASession : Session
8 | {
9 | public override Screen OnCreateScreen(Intent intent)
10 | {
11 | return new AAScreenMenu(CarContext);
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Android/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.Content.PM;
3 | using Android.OS;
4 |
5 | namespace MauiForCars;
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
9 | {
10 | }
11 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/AppShell.xaml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace MauiForCars;
2 |
3 | public partial class MainPage : ContentPage
4 | {
5 | int count = 0;
6 |
7 | public MainPage()
8 | {
9 | InitializeComponent();
10 | }
11 |
12 | private void OnCounterClicked(object sender, EventArgs e)
13 | {
14 | count++;
15 |
16 | if (count == 1)
17 | CounterBtn.Text = $"Clicked {count} time";
18 | else
19 | CounterBtn.Text = $"Clicked {count} times";
20 |
21 | SemanticScreenReader.Announce(CounterBtn.Text);
22 | }
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/MauiProgram.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.Logging;
2 |
3 | namespace MauiForCars;
4 |
5 | public static class MauiProgram
6 | {
7 | public static MauiApp CreateMauiApp()
8 | {
9 | var builder = MauiApp.CreateBuilder();
10 | builder
11 | .UseMauiApp()
12 | .ConfigureFonts(fonts =>
13 | {
14 | fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
15 | fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
16 | });
17 |
18 | #if DEBUG
19 | builder.Logging.AddDebug();
20 | #endif
21 |
22 | return builder.Build();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Resources/Raw/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories). Deployment of the asset to your application
3 | is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
4 |
5 |
6 |
7 | These files will be deployed with you package and will be accessible using Essentials:
8 |
9 | async Task LoadMauiAsset()
10 | {
11 | using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
12 | using var reader = new StreamReader(stream);
13 |
14 | var contents = reader.ReadToEnd();
15 | }
16 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Android/AndroidAuto/Listeners/ActionOnClickListener.cs:
--------------------------------------------------------------------------------
1 | using AndroidX.Car.App;
2 | using AndroidX.Car.App.Model;
3 |
4 | namespace MauiForCars.Platforms.Android.AndroidAuto.Listeners
5 | {
6 | public class ActionOnClickListener : Java.Lang.Object, IOnClickListener
7 | {
8 | private readonly CarContext _carContext;
9 | private readonly string _message;
10 |
11 | public ActionOnClickListener(CarContext carContext, string message = null)
12 | {
13 | _carContext = carContext;
14 | _message = message;
15 | }
16 |
17 | public void OnClick()
18 | {
19 | CarToast.MakeText(_carContext, _message, CarToast.LengthLong).Show();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Android/AndroidAuto/Services/AACarAppService.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using AndroidX.Car.App;
3 | using AndroidX.Car.App.Validation;
4 | using MauiForCars.Platforms.Android.AndroidAuto.Sessions;
5 |
6 | namespace MauiForCars.Platforms.Android.AndroidAuto.Services
7 | {
8 | [Service(Exported = true)]
9 | [IntentFilter(new string[] { "androidx.car.app.CarAppService" }, Categories = new[] { "androidx.car.app.category.POI" })]
10 | public class AACarAppService : CarAppService
11 | {
12 | public override HostValidator CreateHostValidator()
13 | {
14 | return HostValidator.AllowAllHostsValidator;
15 | }
16 |
17 | public override Session OnCreateSession()
18 | {
19 | return new AASession();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Windows/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 | true/PM
12 | PerMonitorV2, PerMonitor
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Tizen/tizen-manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | maui-appicon-placeholder
7 |
8 |
9 |
10 |
11 | http://tizen.org/privilege/internet
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Windows/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml;
2 |
3 | // To learn more about WinUI, the WinUI project structure,
4 | // and more about our project templates, see: http://aka.ms/winui-project-info.
5 |
6 | namespace MauiForCars.WinUI;
7 |
8 | ///
9 | /// Provides application-specific behavior to supplement the default Application class.
10 | ///
11 | public partial class App : MauiWinUIApplication
12 | {
13 | ///
14 | /// Initializes the singleton application object. This is the first line of authored code
15 | /// executed, and as such is the logical equivalent of main() or WinMain().
16 | ///
17 | public App()
18 | {
19 | this.InitializeComponent();
20 | }
21 |
22 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # MauiForCars
2 |
3 | Source code to build apps for cars (Android Auto and Apple CarPlay) with .NET MAUI.
4 |
5 | This repository complements the [MAUI for cars tutorial series on YouTube](https://youtube.com/playlist?list=PL0jJqThQHxikbetR1ODplARyLG6YAPKlz) by [Christian Strydom](https://cvstrydom.co.za).
6 |
7 | [](https://www.youtube.com/watch?v=nNkVxegb2oU)
8 | [](https://www.youtube.com/watch?v=Yg2I6NbHZp8)
9 |
10 | [](https://youtu.be/nNkVxegb2oU)
11 | [](https://youtu.be/Yg2I6NbHZp8)
12 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/MacCatalyst/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIDeviceFamily
6 |
7 | 1
8 | 2
9 |
10 | UIRequiredDeviceCapabilities
11 |
12 | arm64
13 |
14 | UISupportedInterfaceOrientations
15 |
16 | UIInterfaceOrientationPortrait
17 | UIInterfaceOrientationLandscapeLeft
18 | UIInterfaceOrientationLandscapeRight
19 |
20 | UISupportedInterfaceOrientations~ipad
21 |
22 | UIInterfaceOrientationPortrait
23 | UIInterfaceOrientationPortraitUpsideDown
24 | UIInterfaceOrientationLandscapeLeft
25 | UIInterfaceOrientationLandscapeRight
26 |
27 | XSAppIconAssets
28 | Assets.xcassets/appicon.appiconset
29 |
30 |
31 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.0.31611.283
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiForCars", "MauiForCars\MauiForCars.csproj", "{BE58DB1C-7D8B-4165-A841-DBEE4E05D0D2}"
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 | {BE58DB1C-7D8B-4165-A841-DBEE4E05D0D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {BE58DB1C-7D8B-4165-A841-DBEE4E05D0D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {BE58DB1C-7D8B-4165-A841-DBEE4E05D0D2}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
17 | {BE58DB1C-7D8B-4165-A841-DBEE4E05D0D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
18 | {BE58DB1C-7D8B-4165-A841-DBEE4E05D0D2}.Release|Any CPU.Build.0 = Release|Any CPU
19 | {BE58DB1C-7D8B-4165-A841-DBEE4E05D0D2}.Release|Any CPU.Deploy.0 = Release|Any CPU
20 | EndGlobalSection
21 | GlobalSection(SolutionProperties) = preSolution
22 | HideSolutionNode = FALSE
23 | EndGlobalSection
24 | GlobalSection(ExtensibilityGlobals) = postSolution
25 | SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
26 | EndGlobalSection
27 | EndGlobal
28 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
11 |
12 |
17 |
18 |
23 |
24 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Resources/Splash/splash.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Resources/AppIcon/appiconfg.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Android/AndroidAuto/Screens/AAScreenMessageTemplate.cs:
--------------------------------------------------------------------------------
1 | using AndroidX.Car.App;
2 | using AndroidX.Car.App.Model;
3 | using AndroidX.Core.Graphics.Drawable;
4 | using MauiForCars.Platforms.Android.AndroidAuto.Listeners;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using Action = AndroidX.Car.App.Model.Action;
11 |
12 | namespace MauiForCars.Platforms.Android.AndroidAuto.Screens
13 | {
14 | public class AAScreenMessageTemplate : Screen
15 | {
16 | public AAScreenMessageTemplate(CarContext carContext) : base(carContext)
17 | {
18 | }
19 |
20 | public override ITemplate OnGetTemplate()
21 | {
22 | var dotnetBotIconCompat = IconCompat.CreateWithResource(CarContext, Resource.Drawable.dotnet_bot);
23 | var dotnetBotCarIcon = new CarIcon.Builder(dotnetBotIconCompat).Build();
24 |
25 | var actionOne = new Action.Builder()
26 | .SetIcon(dotnetBotCarIcon)
27 | .SetOnClickListener(new ActionOnClickListener(CarContext, "Cancel was tapped"))
28 | .SetTitle("Cancel")
29 | .SetBackgroundColor(CarColor.Red)
30 | .Build();
31 |
32 | var actionTwo = new Action.Builder()
33 | .SetIcon(dotnetBotCarIcon)
34 | .SetOnClickListener(new ActionOnClickListener(CarContext, "Accept was tapped"))
35 | .SetTitle("Accept")
36 | .SetBackgroundColor(CarColor.Green)
37 | .Build();
38 |
39 | return new MessageTemplate.Builder("This is a message template!")
40 | .SetHeaderAction(Action.Back)
41 | .SetTitle("MAUI Android Auto - Message Template")
42 | .SetIcon(dotnetBotCarIcon)
43 | .AddAction(actionOne)
44 | .AddAction(actionTwo)
45 | .Build();
46 | }
47 |
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Windows/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | $placeholder$
15 | User Name
16 | $placeholder$.png
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Android/AndroidAuto/Listeners/NavigationOnClickListener.cs:
--------------------------------------------------------------------------------
1 | using AndroidX.Car.App;
2 | using AndroidX.Car.App.Model;
3 | using MauiForCars.Platforms.Android.AndroidAuto.Enums;
4 | using MauiForCars.Platforms.Android.AndroidAuto.Screens;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 |
11 | namespace MauiForCars.Platforms.Android.AndroidAuto.Listeners
12 | {
13 | public class NavigationOnClickListener : Java.Lang.Object, IOnClickListener
14 | {
15 | private CarContext _carContext;
16 | private ScreenManager _screenManager;
17 | private AAScreen _screenToNavigateTo;
18 |
19 | public NavigationOnClickListener(CarContext carContext, ScreenManager screenManager, AAScreen screenToNavigateTo)
20 | {
21 | _carContext = carContext;
22 | _screenManager = screenManager;
23 | _screenToNavigateTo = screenToNavigateTo;
24 | }
25 |
26 | public void OnClick()
27 | {
28 | switch (_screenToNavigateTo)
29 | {
30 | case AAScreen.None:
31 | return;
32 | case AAScreen.Menu:
33 | _screenManager.Push(new AAScreenMenu(_carContext));
34 | break;
35 | case AAScreen.MessageTemplate:
36 | _screenManager.Push(new AAScreenMessageTemplate(_carContext));
37 | break;
38 | case AAScreen.PaneTemplate:
39 | _screenManager.Push(new AAScreenPaneTemplate(_carContext));
40 | break;
41 | case AAScreen.GridTemplate:
42 | _screenManager.Push(new AAScreenGridTemplate(_carContext));
43 | break;
44 | case AAScreen.Pop:
45 | _screenManager.Pop();
46 | break;
47 | default:
48 | return;
49 |
50 | }
51 |
52 |
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | LSRequiresIPhoneOS
6 |
7 | UIDeviceFamily
8 |
9 | 1
10 | 2
11 |
12 | UIRequiredDeviceCapabilities
13 |
14 | arm64
15 |
16 | UISupportedInterfaceOrientations
17 |
18 | UIInterfaceOrientationPortrait
19 | UIInterfaceOrientationLandscapeLeft
20 | UIInterfaceOrientationLandscapeRight
21 |
22 | UISupportedInterfaceOrientations~ipad
23 |
24 | UIInterfaceOrientationPortrait
25 | UIInterfaceOrientationPortraitUpsideDown
26 | UIInterfaceOrientationLandscapeLeft
27 | UIInterfaceOrientationLandscapeRight
28 |
29 | XSAppIconAssets
30 | Assets.xcassets/appicon.appiconset
31 | CFBundleDisplayName
32 | MauiForCars
33 | CFBundleIdentifier
34 | com.companyname.mauiforcars
35 | CFBundleVersion
36 | 1.0.0.1
37 | CFBundleName
38 | MauiForCars
39 | UIApplicationSceneManifest
40 |
41 | UISceneConfigurations
42 |
43 | UIWindowSceneSessionRoleApplication
44 |
45 |
46 | UISceneClassName
47 | UIWindowScene
48 | UISceneConfigurationName
49 | __MAUI_DEFAULT_SCENE_CONFIGURATION__
50 | UISceneDelegateClassName
51 | DeviceSceneDelegate
52 |
53 |
54 | CPTemplateApplicationSceneSessionRoleApplication
55 |
56 |
57 | UISceneClassName
58 | CPTemplateApplicationScene
59 | UISceneConfigurationName
60 | MauiForCars-Car
61 | UISceneDelegateClassName
62 | CarPlaySceneDelegate
63 |
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Resources/Styles/Colors.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 | #512BD4
8 | #DFD8F7
9 | #2B0B98
10 | White
11 | Black
12 | #E1E1E1
13 | #C8C8C8
14 | #ACACAC
15 | #919191
16 | #6E6E6E
17 | #404040
18 | #212121
19 | #141414
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | #F7B548
35 | #FFD590
36 | #FFE5B9
37 | #28C2D1
38 | #7BDDEF
39 | #C3F2F4
40 | #3E8EED
41 | #72ACF1
42 | #A7CBF6
43 |
44 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Android/AndroidAuto/Screens/AAScreenMenu.cs:
--------------------------------------------------------------------------------
1 | using AndroidX.Car.App;
2 | using AndroidX.Car.App.Model;
3 | using AndroidX.Core.Graphics.Drawable;
4 | using MauiForCars.Platforms.Android.AndroidAuto.Listeners;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using Action = AndroidX.Car.App.Model.Action;
11 |
12 | namespace MauiForCars.Platforms.Android.AndroidAuto.Screens
13 | {
14 | public class AAScreenMenu : Screen
15 | {
16 | public AAScreenMenu(CarContext carContext) : base(carContext)
17 | {
18 | }
19 |
20 | public override ITemplate OnGetTemplate()
21 | {
22 | try
23 | {
24 | var dotnetBotIconCompat = IconCompat.CreateWithResource(CarContext, Resource.Drawable.dotnet_bot);
25 | var dotnetBotCarIcon = new CarIcon.Builder(dotnetBotIconCompat).Build();
26 |
27 | var messageTemplateScreen = new Row.Builder()
28 | .SetTitle("Message Template")
29 | .SetOnClickListener(new NavigationOnClickListener(CarContext, ScreenManager, Enums.AAScreen.MessageTemplate))
30 | .SetImage(dotnetBotCarIcon)
31 | .SetBrowsable(true)
32 | .Build();
33 |
34 | var paneTemplateScreen = new Row.Builder()
35 | .SetTitle("Pane Template")
36 | .SetOnClickListener(new NavigationOnClickListener(CarContext, ScreenManager, Enums.AAScreen.PaneTemplate))
37 | .SetImage(dotnetBotCarIcon)
38 | .SetBrowsable(true)
39 | .Build();
40 |
41 | var gridTemplateScreen = new Row.Builder()
42 | .SetTitle("Grid Template")
43 | .SetOnClickListener(new NavigationOnClickListener(CarContext, ScreenManager, Enums.AAScreen.GridTemplate))
44 | .SetImage(dotnetBotCarIcon)
45 | .SetBrowsable(true)
46 | .Build();
47 |
48 | var itemLsit = new ItemList.Builder()
49 | .SetNoItemsMessage("Our MAUI app is running on Android Auto!")
50 | .AddItem(messageTemplateScreen)
51 | .AddItem(paneTemplateScreen)
52 | .AddItem(gridTemplateScreen)
53 | .Build();
54 |
55 | return new ListTemplate.Builder()
56 | .SetHeaderAction(Action.AppIcon)
57 | .SetTitle("MAUI Android Auto - Menu")
58 | .SetSingleList(itemLsit)
59 | .Build();
60 | }
61 | catch (Exception ex)
62 | {
63 | throw;
64 | }
65 |
66 | }
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Android/AndroidAuto/Screens/AAScreenGridTemplate.cs:
--------------------------------------------------------------------------------
1 | using AndroidX.Car.App;
2 | using AndroidX.Car.App.Model;
3 | using AndroidX.Core.Graphics.Drawable;
4 | using MauiForCars.Platforms.Android.AndroidAuto.Listeners;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using Action = AndroidX.Car.App.Model.Action;
11 |
12 | namespace MauiForCars.Platforms.Android.AndroidAuto.Screens
13 | {
14 | public class AAScreenGridTemplate : Screen
15 | {
16 | public AAScreenGridTemplate(CarContext carContext) : base(carContext)
17 | {
18 | }
19 |
20 | public override ITemplate OnGetTemplate()
21 | {
22 | try
23 | {
24 | var homeGridItemsListBuilder = new ItemList.Builder().SetNoItemsMessage("This is a MAUI app running on Android Auto!");
25 |
26 | var dotnetBotIconCompat = IconCompat.CreateWithResource(CarContext, Resource.Drawable.dotnet_bot);
27 | var dotnetBotCarIcon = new CarIcon.Builder(dotnetBotIconCompat).Build();
28 |
29 | for (int i = 1; i <= 9; i++)
30 | {
31 | var gridItem = new GridItem.Builder()
32 | .SetTitle($"Item {i} Title")
33 | .SetText($"Item {i} Text")
34 | .SetImage(dotnetBotCarIcon)
35 | .SetOnClickListener(new ActionOnClickListener(CarContext, $"Grid item {i} was tapped"))
36 | .Build();
37 |
38 | homeGridItemsListBuilder.AddItem(gridItem);
39 | }
40 |
41 | var homeGridItems = homeGridItemsListBuilder.Build();
42 |
43 | var actionOne = new Action.Builder()
44 | .SetIcon(dotnetBotCarIcon)
45 | .SetOnClickListener(new ActionOnClickListener(CarContext, $"Action strip item 1 was tapped"))
46 | .Build();
47 |
48 | var actionTwo = new Action.Builder()
49 | .SetIcon(dotnetBotCarIcon)
50 | .SetOnClickListener(new ActionOnClickListener(CarContext, $"Action strip item 2 was tapped"))
51 | .Build();
52 |
53 | var actionStrip = new ActionStrip.Builder()
54 | .AddAction(actionOne)
55 | .AddAction(actionTwo)
56 | .Build();
57 |
58 | return new GridTemplate.Builder()
59 | .SetHeaderAction(Action.Back)
60 | .SetTitle("MAUI Android Auto - Grid Template")
61 | .SetSingleList(homeGridItems)
62 | .SetActionStrip(actionStrip)
63 | .Build();
64 | }
65 | catch (Exception e)
66 | {
67 |
68 | throw;
69 | }
70 |
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/Android/AndroidAuto/Screens/AAScreenPaneTemplate.cs:
--------------------------------------------------------------------------------
1 | using AndroidX.Car.App;
2 | using AndroidX.Car.App.Model;
3 | using AndroidX.Core.Graphics.Drawable;
4 | using MauiForCars.Platforms.Android.AndroidAuto.Listeners;
5 | using Action = AndroidX.Car.App.Model.Action;
6 |
7 | namespace MauiForCars.Platforms.Android.AndroidAuto.Screens
8 | {
9 | public class AAScreenPaneTemplate : Screen
10 | {
11 | public AAScreenPaneTemplate(CarContext carContext) : base(carContext)
12 | {
13 | }
14 |
15 | public override ITemplate OnGetTemplate()
16 | {
17 | try
18 | {
19 | var dotnetBotIconCompat = IconCompat.CreateWithResource(CarContext, Resource.Drawable.dotnet_bot);
20 | var dotnetBotCarIcon = new CarIcon.Builder(dotnetBotIconCompat).Build();
21 |
22 | var paneAction = new Action.Builder()
23 | .SetIcon(dotnetBotCarIcon)
24 | .SetBackgroundColor(CarColor.Blue)
25 | .SetTitle("< Go back")
26 | .SetOnClickListener(new NavigationOnClickListener(CarContext, ScreenManager, Enums.AAScreen.Pop))
27 | .Build();
28 |
29 |
30 | var paneBuilder = new Pane.Builder()
31 | .SetImage(dotnetBotCarIcon)
32 | .AddAction(paneAction);
33 |
34 | for (var i = 1; i <= 10; i++)
35 | {
36 | var row = new Row.Builder()
37 | .SetTitle($"Row {i} title")
38 | .SetImage(dotnetBotCarIcon)
39 | .AddText($"Row {i} text")
40 | .Build();
41 |
42 | paneBuilder.AddRow(row);
43 | }
44 |
45 | var pane = paneBuilder.Build();
46 |
47 | var actionOne = new Action.Builder()
48 | .SetIcon(dotnetBotCarIcon)
49 | .SetOnClickListener(new ActionOnClickListener(CarContext, $"Action strip item 1 was tapped"))
50 | .Build();
51 |
52 | var actionTwo = new Action.Builder()
53 | .SetIcon(dotnetBotCarIcon)
54 | .SetOnClickListener(new ActionOnClickListener(CarContext, $"Action strip item 2 was tapped"))
55 | .Build();
56 |
57 | var actionStrip = new ActionStrip.Builder()
58 | .AddAction(actionOne)
59 | .AddAction(actionTwo)
60 | .Build();
61 |
62 | return new PaneTemplate.Builder(pane)
63 | .SetTitle("MAUI Android Auto - Pane Template")
64 | .SetActionStrip(actionStrip)
65 | .SetHeaderAction(Action.Back)
66 | .Build();
67 | }
68 | catch (Exception)
69 | {
70 |
71 | throw;
72 | }
73 |
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/MauiForCars.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net7.0-android;net7.0-ios;net7.0-maccatalyst
5 | $(TargetFrameworks);net7.0-windows10.0.19041.0
6 |
7 |
8 | Exe
9 | MauiForCars
10 | true
11 | true
12 | enable
13 |
14 |
15 | MauiForCars
16 |
17 |
18 | com.companyname.mauiforcars
19 | ebeb18ad-4c29-4760-a494-692f1e6048d4
20 |
21 |
22 | 1.0
23 | 1
24 |
25 | 11.0
26 | 13.1
27 | 23.0
28 | 10.0.17763.0
29 | 10.0.17763.0
30 | 6.5
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | 1.2.0.1
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Platforms/iOS/CarPlaySceneDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using CarPlay;
3 | using Foundation;
4 | using System.Runtime.Versioning;
5 |
6 | namespace MauiCarAppDemo2.Platforms.iOS
7 | {
8 | [SupportedOSPlatform("ios16.0")]
9 | [UnsupportedOSPlatform("macos")]
10 | [UnsupportedOSPlatform("maccatalyst")]
11 | [Register("CarPlaySceneDelegate")]
12 | public class CarPlaySceneDelegate : CPTemplateApplicationSceneDelegate
13 | {
14 | private CPInterfaceController _interfaceController;
15 | private CPTabBarTemplate _tabBarTemplate;
16 | private CPListTemplate _listTemplate;
17 | private CPGridTemplate _gridTemplate;
18 | private CPPointOfInterestTemplate _poiTemplate;
19 | private CPInformationTemplate _infoTemplate;
20 | private nint _selectedPoi;
21 |
22 |
23 | public CarPlaySceneDelegate()
24 | {
25 | _gridTemplate = BuildGridTemplate();
26 | _listTemplate = BuildListTemplate();
27 | _poiTemplate = BuildPoiTemplate();
28 | _infoTemplate = BuildInfoTemplate();
29 | _tabBarTemplate = new CPTabBarTemplate(new CPTemplate[] { _gridTemplate, _listTemplate, _poiTemplate, _infoTemplate });
30 |
31 | }
32 |
33 | private CPGridTemplate BuildGridTemplate()
34 | {
35 | List gridButtons = new List();
36 |
37 | for (var i = 0; i < 8; i++)
38 | {
39 | gridButtons.Add(
40 | new CPGridButton(titleVariants: new string[] { $"Grid item: {i + 1}" },
41 | UIKit.UIImage.FromBundle("dotnet_bot"),
42 | (action) => { _interfaceController.PresentTemplate(BuildAlertTemplate("Grid item was tapped"), true); })
43 | );
44 | }
45 |
46 |
47 | var gridTemplate = new CPGridTemplate("Grid Template", gridButtons.ToArray())
48 | {
49 | TabImage = UIKit.UIImage.GetSystemImage("circle.grid.3x3.fill"),
50 | };
51 |
52 | return gridTemplate;
53 | }
54 |
55 | private CPListTemplate BuildListTemplate()
56 | {
57 | List sectionListItems1 = new List();
58 | List sectionListItems2 = new List();
59 |
60 | for (var i = 0; i < 4; i++)
61 | {
62 | var listButton = new CPListItem(text: $"List item: {i + 1}", detailText: "Section 1 list item", UIKit.UIImage.FromBundle("dotnet_bot"))
63 | {
64 | Handler = (item, block) =>
65 | {
66 | block.Invoke();
67 | _interfaceController.PresentTemplate(BuildAlertTemplate("Section 1 list item was tapped"), true);
68 | }
69 | };
70 | }
71 |
72 | for (var i = 0; i < 4; i++)
73 | {
74 | var listButton = new CPListItem(text: $"List item: {i + 1}", detailText: "Section 2 list item", UIKit.UIImage.FromBundle("dotnet_bot"))
75 | {
76 | Handler = (item, block) =>
77 | {
78 | block.Invoke();
79 | _interfaceController.PresentTemplate(BuildAlertTemplate("Section 2 list item was tapped"), true);
80 | }
81 | };
82 | sectionListItems2.Add(listButton);
83 | }
84 |
85 | var listSections = new CPListSection[]
86 | {
87 | new CPListSection(sectionListItems1.ToArray(),"Section 1", "Section 1 Index Title"),
88 | new CPListSection(sectionListItems2.ToArray(),"Section 2", "Section 2 Index Title"),
89 | };
90 |
91 | var listTemplate = new CPListTemplate("List Template", listSections)
92 | {
93 | TabImage = UIKit.UIImage.GetSystemImage("list.dash")
94 | };
95 |
96 | return listTemplate;
97 | }
98 |
99 | private CPPointOfInterestTemplate BuildPoiTemplate()
100 | {
101 | var pointsOfInterest = new CPPointOfInterest[]
102 | {
103 | new CPPointOfInterest(new MapKit.MKMapItem(new MapKit.MKPlacemark(new CoreLocation.CLLocationCoordinate2D(6.640736232446453, 3.332384122105398))),
104 | "Subcribe Now",
105 | "For more great tutorials",
106 | "Hit the like if useful",
107 | "Thank you!",
108 | "I hope you find the videos helpful",
109 | "Many more tutorials coming!",
110 | UIKit.UIImage.GetSystemImage("video")),
111 |
112 | new CPPointOfInterest(new MapKit.MKMapItem(new MapKit.MKPlacemark(new CoreLocation.CLLocationCoordinate2D(6.645878547828399, 3.325916039566034))),
113 | "School",
114 | "For more great tutorials",
115 | "Hit the like if useful",
116 | "Thank you!",
117 | "I hope you find the videos helpful",
118 | "Many more tutorials coming!",
119 | UIKit.UIImage.GetSystemImage("book")),
120 |
121 | new CPPointOfInterest(new MapKit.MKMapItem(new MapKit.MKPlacemark(new CoreLocation.CLLocationCoordinate2D(6.6406485855942865, 3.33157652029374))),
122 | "Shop",
123 | "For more great tutorials",
124 | "Hit the like if useful",
125 | "Thank you!",
126 | "I hope you find the videos helpful",
127 | "Many more tutorials coming!",
128 | UIKit.UIImage.GetSystemImage("cart")),
129 | };
130 |
131 | var poiTemplate = new CPPointOfInterestTemplate("POI Template", pointsOfInterest, _selectedPoi)
132 | {
133 | TabImage = UIKit.UIImage.GetSystemImage("pin"),
134 | };
135 | return poiTemplate;
136 | }
137 |
138 | private CPInformationTemplate BuildInfoTemplate()
139 | {
140 | var infoItems = new CPInformationItem[]
141 | {
142 | new CPInformationItem("Hi there","Here is your detail message"),
143 | new CPInformationItem("Groceries","Milk"),
144 | new CPInformationItem("Groceries","Bread"),
145 | new CPInformationItem("Groceries","Sugar"),
146 | };
147 |
148 | var textButtons = new CPTextButton[]
149 | {
150 | new CPTextButton("Accept",CPTextButtonStyle.Confirm,(action) => _interfaceController.PresentTemplate(BuildAlertTemplate("Accept was tapped"),true)),
151 | new CPTextButton("Cancel",CPTextButtonStyle.Cancel,(action) => _interfaceController.PresentTemplate(BuildAlertTemplate("Cancel was tapped"),true)),
152 | };
153 |
154 | var infoTemplate = new CPInformationTemplate("Info Template", CPInformationTemplateLayout.TwoColumn, infoItems, textButtons)
155 | {
156 | TabImage = UIKit.UIImage.GetSystemImage("info.circle.fill"),
157 | };
158 |
159 | return infoTemplate;
160 | }
161 |
162 | private CPAlertTemplate BuildAlertTemplate(string message)
163 | {
164 | return new CPAlertTemplate(titleVariants: new[] { message },
165 | new[]
166 | {
167 | new CPAlertAction("Dismiss",CPAlertActionStyle.Default,(action) => _interfaceController.DismissTemplate(true))
168 | });
169 | }
170 |
171 | public override void DidConnect(CPTemplateApplicationScene templateApplicationScene, CPInterfaceController interfaceController)
172 | {
173 | _interfaceController = interfaceController;
174 | _interfaceController.SetRootTemplate(_tabBarTemplate, true);
175 | }
176 |
177 | public override void DidDisconnect(CPTemplateApplicationScene templateApplicationScene, CPInterfaceController interfaceController)
178 | {
179 | _interfaceController.Dispose();
180 | }
181 | }
182 | }
183 |
184 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Ww][Ii][Nn]32/
27 | [Aa][Rr][Mm]/
28 | [Aa][Rr][Mm]64/
29 | bld/
30 | [Bb]in/
31 | [Oo]bj/
32 | [Ll]og/
33 | [Ll]ogs/
34 |
35 | # Visual Studio 2015/2017 cache/options directory
36 | .vs/
37 | # Uncomment if you have tasks that create the project's static files in wwwroot
38 | #wwwroot/
39 |
40 | # Visual Studio 2017 auto generated files
41 | Generated\ Files/
42 |
43 | # MSTest test Results
44 | [Tt]est[Rr]esult*/
45 | [Bb]uild[Ll]og.*
46 |
47 | # NUnit
48 | *.VisualState.xml
49 | TestResult.xml
50 | nunit-*.xml
51 |
52 | # Build Results of an ATL Project
53 | [Dd]ebugPS/
54 | [Rr]eleasePS/
55 | dlldata.c
56 |
57 | # Benchmark Results
58 | BenchmarkDotNet.Artifacts/
59 |
60 | # .NET Core
61 | project.lock.json
62 | project.fragment.lock.json
63 | artifacts/
64 |
65 | # ASP.NET Scaffolding
66 | ScaffoldingReadMe.txt
67 |
68 | # StyleCop
69 | StyleCopReport.xml
70 |
71 | # Files built by Visual Studio
72 | *_i.c
73 | *_p.c
74 | *_h.h
75 | *.ilk
76 | *.meta
77 | *.obj
78 | *.iobj
79 | *.pch
80 | *.pdb
81 | *.ipdb
82 | *.pgc
83 | *.pgd
84 | *.rsp
85 | *.sbr
86 | *.tlb
87 | *.tli
88 | *.tlh
89 | *.tmp
90 | *.tmp_proj
91 | *_wpftmp.csproj
92 | *.log
93 | *.tlog
94 | *.vspscc
95 | *.vssscc
96 | .builds
97 | *.pidb
98 | *.svclog
99 | *.scc
100 |
101 | # Chutzpah Test files
102 | _Chutzpah*
103 |
104 | # Visual C++ cache files
105 | ipch/
106 | *.aps
107 | *.ncb
108 | *.opendb
109 | *.opensdf
110 | *.sdf
111 | *.cachefile
112 | *.VC.db
113 | *.VC.VC.opendb
114 |
115 | # Visual Studio profiler
116 | *.psess
117 | *.vsp
118 | *.vspx
119 | *.sap
120 |
121 | # Visual Studio Trace Files
122 | *.e2e
123 |
124 | # TFS 2012 Local Workspace
125 | $tf/
126 |
127 | # Guidance Automation Toolkit
128 | *.gpState
129 |
130 | # ReSharper is a .NET coding add-in
131 | _ReSharper*/
132 | *.[Rr]e[Ss]harper
133 | *.DotSettings.user
134 |
135 | # TeamCity is a build add-in
136 | _TeamCity*
137 |
138 | # DotCover is a Code Coverage Tool
139 | *.dotCover
140 |
141 | # AxoCover is a Code Coverage Tool
142 | .axoCover/*
143 | !.axoCover/settings.json
144 |
145 | # Coverlet is a free, cross platform Code Coverage Tool
146 | coverage*.json
147 | coverage*.xml
148 | coverage*.info
149 |
150 | # Visual Studio code coverage results
151 | *.coverage
152 | *.coveragexml
153 |
154 | # NCrunch
155 | _NCrunch_*
156 | .*crunch*.local.xml
157 | nCrunchTemp_*
158 |
159 | # MightyMoose
160 | *.mm.*
161 | AutoTest.Net/
162 |
163 | # Web workbench (sass)
164 | .sass-cache/
165 |
166 | # Installshield output folder
167 | [Ee]xpress/
168 |
169 | # DocProject is a documentation generator add-in
170 | DocProject/buildhelp/
171 | DocProject/Help/*.HxT
172 | DocProject/Help/*.HxC
173 | DocProject/Help/*.hhc
174 | DocProject/Help/*.hhk
175 | DocProject/Help/*.hhp
176 | DocProject/Help/Html2
177 | DocProject/Help/html
178 |
179 | # Click-Once directory
180 | publish/
181 |
182 | # Publish Web Output
183 | *.[Pp]ublish.xml
184 | *.azurePubxml
185 | # Note: Comment the next line if you want to checkin your web deploy settings,
186 | # but database connection strings (with potential passwords) will be unencrypted
187 | *.pubxml
188 | *.publishproj
189 |
190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
191 | # checkin your Azure Web App publish settings, but sensitive information contained
192 | # in these scripts will be unencrypted
193 | PublishScripts/
194 |
195 | # NuGet Packages
196 | *.nupkg
197 | # NuGet Symbol Packages
198 | *.snupkg
199 | # The packages folder can be ignored because of Package Restore
200 | **/[Pp]ackages/*
201 | # except build/, which is used as an MSBuild target.
202 | !**/[Pp]ackages/build/
203 | # Uncomment if necessary however generally it will be regenerated when needed
204 | #!**/[Pp]ackages/repositories.config
205 | # NuGet v3's project.json files produces more ignorable files
206 | *.nuget.props
207 | *.nuget.targets
208 |
209 | # Microsoft Azure Build Output
210 | csx/
211 | *.build.csdef
212 |
213 | # Microsoft Azure Emulator
214 | ecf/
215 | rcf/
216 |
217 | # Windows Store app package directories and files
218 | AppPackages/
219 | BundleArtifacts/
220 | Package.StoreAssociation.xml
221 | _pkginfo.txt
222 | *.appx
223 | *.appxbundle
224 | *.appxupload
225 |
226 | # Visual Studio cache files
227 | # files ending in .cache can be ignored
228 | *.[Cc]ache
229 | # but keep track of directories ending in .cache
230 | !?*.[Cc]ache/
231 |
232 | # Others
233 | ClientBin/
234 | ~$*
235 | *~
236 | *.dbmdl
237 | *.dbproj.schemaview
238 | *.jfm
239 | *.pfx
240 | *.publishsettings
241 | orleans.codegen.cs
242 |
243 | # Including strong name files can present a security risk
244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
245 | #*.snk
246 |
247 | # Since there are multiple workflows, uncomment next line to ignore bower_components
248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
249 | #bower_components/
250 |
251 | # RIA/Silverlight projects
252 | Generated_Code/
253 |
254 | # Backup & report files from converting an old project file
255 | # to a newer Visual Studio version. Backup files are not needed,
256 | # because we have git ;-)
257 | _UpgradeReport_Files/
258 | Backup*/
259 | UpgradeLog*.XML
260 | UpgradeLog*.htm
261 | ServiceFabricBackup/
262 | *.rptproj.bak
263 |
264 | # SQL Server files
265 | *.mdf
266 | *.ldf
267 | *.ndf
268 |
269 | # Business Intelligence projects
270 | *.rdl.data
271 | *.bim.layout
272 | *.bim_*.settings
273 | *.rptproj.rsuser
274 | *- [Bb]ackup.rdl
275 | *- [Bb]ackup ([0-9]).rdl
276 | *- [Bb]ackup ([0-9][0-9]).rdl
277 |
278 | # Microsoft Fakes
279 | FakesAssemblies/
280 |
281 | # GhostDoc plugin setting file
282 | *.GhostDoc.xml
283 |
284 | # Node.js Tools for Visual Studio
285 | .ntvs_analysis.dat
286 | node_modules/
287 |
288 | # Visual Studio 6 build log
289 | *.plg
290 |
291 | # Visual Studio 6 workspace options file
292 | *.opt
293 |
294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295 | *.vbw
296 |
297 | # Visual Studio 6 auto-generated project file (contains which files were open etc.)
298 | *.vbp
299 |
300 | # Visual Studio 6 workspace and project file (working project files containing files to include in project)
301 | *.dsw
302 | *.dsp
303 |
304 | # Visual Studio 6 technical files
305 | *.ncb
306 | *.aps
307 |
308 | # Visual Studio LightSwitch build output
309 | **/*.HTMLClient/GeneratedArtifacts
310 | **/*.DesktopClient/GeneratedArtifacts
311 | **/*.DesktopClient/ModelManifest.xml
312 | **/*.Server/GeneratedArtifacts
313 | **/*.Server/ModelManifest.xml
314 | _Pvt_Extensions
315 |
316 | # Paket dependency manager
317 | .paket/paket.exe
318 | paket-files/
319 |
320 | # FAKE - F# Make
321 | .fake/
322 |
323 | # CodeRush personal settings
324 | .cr/personal
325 |
326 | # Python Tools for Visual Studio (PTVS)
327 | __pycache__/
328 | *.pyc
329 |
330 | # Cake - Uncomment if you are using it
331 | # tools/**
332 | # !tools/packages.config
333 |
334 | # Tabs Studio
335 | *.tss
336 |
337 | # Telerik's JustMock configuration file
338 | *.jmconfig
339 |
340 | # BizTalk build output
341 | *.btp.cs
342 | *.btm.cs
343 | *.odx.cs
344 | *.xsd.cs
345 |
346 | # OpenCover UI analysis results
347 | OpenCover/
348 |
349 | # Azure Stream Analytics local run output
350 | ASALocalRun/
351 |
352 | # MSBuild Binary and Structured Log
353 | *.binlog
354 |
355 | # NVidia Nsight GPU debugger configuration file
356 | *.nvuser
357 |
358 | # MFractors (Xamarin productivity tool) working folder
359 | .mfractor/
360 |
361 | # Local History for Visual Studio
362 | .localhistory/
363 |
364 | # Visual Studio History (VSHistory) files
365 | .vshistory/
366 |
367 | # BeatPulse healthcheck temp database
368 | healthchecksdb
369 |
370 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
371 | MigrationBackup/
372 |
373 | # Ionide (cross platform F# VS Code tools) working folder
374 | .ionide/
375 |
376 | # Fody - auto-generated XML schema
377 | FodyWeavers.xsd
378 |
379 | # VS Code files for those working on multiple tools
380 | .vscode/*
381 | !.vscode/settings.json
382 | !.vscode/tasks.json
383 | !.vscode/launch.json
384 | !.vscode/extensions.json
385 | *.code-workspace
386 |
387 | # Local History for Visual Studio Code
388 | .history/
389 |
390 | # Windows Installer files from build outputs
391 | *.cab
392 | *.msi
393 | *.msix
394 | *.msm
395 | *.msp
396 |
397 | # JetBrains Rider
398 | *.sln.iml
399 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Resources/Images/dotnet_bot.svg:
--------------------------------------------------------------------------------
1 |
94 |
--------------------------------------------------------------------------------
/MauiForCars/MauiForCars/Resources/Styles/Styles.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
10 |
11 |
15 |
16 |
21 |
22 |
25 |
26 |
49 |
50 |
67 |
68 |
88 |
89 |
110 |
111 |
132 |
133 |
138 |
139 |
159 |
160 |
178 |
179 |
183 |
184 |
206 |
207 |
222 |
223 |
243 |
244 |
247 |
248 |
271 |
272 |
292 |
293 |
299 |
300 |
319 |
320 |
323 |
324 |
352 |
353 |
373 |
374 |
378 |
379 |
391 |
392 |
397 |
398 |
404 |
405 |
406 |
--------------------------------------------------------------------------------