diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0a079b6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/bin +/obj \ No newline at end of file diff --git a/App.xaml b/App.xaml new file mode 100644 index 0000000..fe75c72 --- /dev/null +++ b/App.xaml @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/App.xaml.cs b/App.xaml.cs new file mode 100644 index 0000000..1a5f3b6 --- /dev/null +++ b/App.xaml.cs @@ -0,0 +1,15 @@ +namespace MauiApp1 +{ + public partial class App : Application + { + public App() + { + InitializeComponent(); + } + + protected override Window CreateWindow(IActivationState? activationState) + { + return new Window(new MainPage()) { Title = "MauiApp1" }; + } + } +} diff --git a/Components/Layout/MainLayout.razor b/Components/Layout/MainLayout.razor new file mode 100644 index 0000000..e1a9a75 --- /dev/null +++ b/Components/Layout/MainLayout.razor @@ -0,0 +1,3 @@ +@inherits LayoutComponentBase + +@Body diff --git a/Components/Layout/MainLayout.razor.css b/Components/Layout/MainLayout.razor.css new file mode 100644 index 0000000..e69de29 diff --git a/Components/Pages/Home.razor b/Components/Pages/Home.razor new file mode 100644 index 0000000..16dac31 --- /dev/null +++ b/Components/Pages/Home.razor @@ -0,0 +1,5 @@ +@page "/" + +

Hello, world!

+ +Welcome to your new app. diff --git a/Components/Routes.razor b/Components/Routes.razor new file mode 100644 index 0000000..631cf80 --- /dev/null +++ b/Components/Routes.razor @@ -0,0 +1,6 @@ + + + + + + diff --git a/Components/_Imports.razor b/Components/_Imports.razor new file mode 100644 index 0000000..f8f748d --- /dev/null +++ b/Components/_Imports.razor @@ -0,0 +1,9 @@ +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using Microsoft.AspNetCore.Components.Web.Virtualization +@using Microsoft.JSInterop +@using MauiApp1 +@using MauiApp1.Components diff --git a/MainPage.xaml b/MainPage.xaml new file mode 100644 index 0000000..4e1b7e9 --- /dev/null +++ b/MainPage.xaml @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/MainPage.xaml.cs b/MainPage.xaml.cs new file mode 100644 index 0000000..2defb85 --- /dev/null +++ b/MainPage.xaml.cs @@ -0,0 +1,10 @@ +namespace MauiApp1 +{ + public partial class MainPage : ContentPage + { + public MainPage() + { + InitializeComponent(); + } + } +} diff --git a/MauiApp1.csproj b/MauiApp1.csproj new file mode 100644 index 0000000..bcb1f42 --- /dev/null +++ b/MauiApp1.csproj @@ -0,0 +1,69 @@ + + + + net9.0-android;net9.0-ios;net9.0-maccatalyst + $(TargetFrameworks);net9.0-windows10.0.19041.0 + + + + + + + Exe + MauiApp1 + true + true + enable + false + enable + + + MauiApp1 + + + com.companyname.mauiapp1 + + + 1.0 + 1 + + + None + + 15.0 + 15.0 + 24.0 + 10.0.17763.0 + 10.0.17763.0 + 6.5 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MauiApp1.csproj.user b/MauiApp1.csproj.user new file mode 100644 index 0000000..e80d69a --- /dev/null +++ b/MauiApp1.csproj.user @@ -0,0 +1,22 @@ + + + + False + net9.0-windows10.0.19041.0 + Windows Machine + + + + Designer + + + Designer + + + Designer + + + Designer + + + \ No newline at end of file diff --git a/MauiProgram.cs b/MauiProgram.cs new file mode 100644 index 0000000..d384e9b --- /dev/null +++ b/MauiProgram.cs @@ -0,0 +1,27 @@ +using Microsoft.Extensions.Logging; + +namespace MauiApp1 +{ + public static class MauiProgram + { + public static MauiApp CreateMauiApp() + { + var builder = MauiApp.CreateBuilder(); + builder + .UseMauiApp() + .ConfigureFonts(fonts => + { + fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); + }); + + builder.Services.AddMauiBlazorWebView(); + +#if DEBUG + builder.Services.AddBlazorWebViewDeveloperTools(); + builder.Logging.AddDebug(); +#endif + + return builder.Build(); + } + } +} diff --git a/Platforms/Android/AndroidManifest.xml b/Platforms/Android/AndroidManifest.xml new file mode 100644 index 0000000..dbf9e7e --- /dev/null +++ b/Platforms/Android/AndroidManifest.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Platforms/Android/MainActivity.cs b/Platforms/Android/MainActivity.cs new file mode 100644 index 0000000..81c26e3 --- /dev/null +++ b/Platforms/Android/MainActivity.cs @@ -0,0 +1,11 @@ +using Android.App; +using Android.Content.PM; +using Android.OS; + +namespace MauiApp1 +{ + [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] + public class MainActivity : MauiAppCompatActivity + { + } +} diff --git a/Platforms/Android/MainApplication.cs b/Platforms/Android/MainApplication.cs new file mode 100644 index 0000000..8547160 --- /dev/null +++ b/Platforms/Android/MainApplication.cs @@ -0,0 +1,16 @@ +using Android.App; +using Android.Runtime; + +namespace MauiApp1 +{ + [Application] + public class MainApplication : MauiApplication + { + public MainApplication(IntPtr handle, JniHandleOwnership ownership) + : base(handle, ownership) + { + } + + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } +} diff --git a/Platforms/Android/Resources/values/colors.xml b/Platforms/Android/Resources/values/colors.xml new file mode 100644 index 0000000..c04d749 --- /dev/null +++ b/Platforms/Android/Resources/values/colors.xml @@ -0,0 +1,6 @@ + + + #512BD4 + #2B0B98 + #2B0B98 + \ No newline at end of file diff --git a/Platforms/MacCatalyst/AppDelegate.cs b/Platforms/MacCatalyst/AppDelegate.cs new file mode 100644 index 0000000..9f49fad --- /dev/null +++ b/Platforms/MacCatalyst/AppDelegate.cs @@ -0,0 +1,10 @@ +using Foundation; + +namespace MauiApp1 +{ + [Register("AppDelegate")] + public class AppDelegate : MauiUIApplicationDelegate + { + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } +} diff --git a/Platforms/MacCatalyst/Entitlements.plist b/Platforms/MacCatalyst/Entitlements.plist new file mode 100644 index 0000000..de4adc9 --- /dev/null +++ b/Platforms/MacCatalyst/Entitlements.plist @@ -0,0 +1,14 @@ + + + + + + + com.apple.security.app-sandbox + + + com.apple.security.network.client + + + + diff --git a/Platforms/MacCatalyst/Info.plist b/Platforms/MacCatalyst/Info.plist new file mode 100644 index 0000000..7b1e6e6 --- /dev/null +++ b/Platforms/MacCatalyst/Info.plist @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + UIDeviceFamily + + 2 + + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/appicon.appiconset + + diff --git a/Platforms/MacCatalyst/Program.cs b/Platforms/MacCatalyst/Program.cs new file mode 100644 index 0000000..8ff3569 --- /dev/null +++ b/Platforms/MacCatalyst/Program.cs @@ -0,0 +1,16 @@ +using ObjCRuntime; +using UIKit; + +namespace MauiApp1 +{ + 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)); + } + } +} \ No newline at end of file diff --git a/Platforms/Tizen/Main.cs b/Platforms/Tizen/Main.cs new file mode 100644 index 0000000..ae2749a --- /dev/null +++ b/Platforms/Tizen/Main.cs @@ -0,0 +1,17 @@ +using System; +using Microsoft.Maui; +using Microsoft.Maui.Hosting; + +namespace MauiApp1 +{ + internal class Program : MauiApplication + { + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + + static void Main(string[] args) + { + var app = new Program(); + app.Run(args); + } + } +} diff --git a/Platforms/Tizen/tizen-manifest.xml b/Platforms/Tizen/tizen-manifest.xml new file mode 100644 index 0000000..8d0eab9 --- /dev/null +++ b/Platforms/Tizen/tizen-manifest.xml @@ -0,0 +1,15 @@ + + + + + + maui-appicon-placeholder + + + + + http://tizen.org/privilege/internet + + + + \ No newline at end of file diff --git a/Platforms/Windows/App.xaml b/Platforms/Windows/App.xaml new file mode 100644 index 0000000..4cf2244 --- /dev/null +++ b/Platforms/Windows/App.xaml @@ -0,0 +1,8 @@ + + + diff --git a/Platforms/Windows/App.xaml.cs b/Platforms/Windows/App.xaml.cs new file mode 100644 index 0000000..16ead9b --- /dev/null +++ b/Platforms/Windows/App.xaml.cs @@ -0,0 +1,25 @@ +using Microsoft.UI.Xaml; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace MauiApp1.WinUI +{ + /// + /// Provides application-specific behavior to supplement the default Application class. + /// + public partial class App : MauiWinUIApplication + { + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + this.InitializeComponent(); + } + + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } + +} diff --git a/Platforms/Windows/Package.appxmanifest b/Platforms/Windows/Package.appxmanifest new file mode 100644 index 0000000..eff7b89 --- /dev/null +++ b/Platforms/Windows/Package.appxmanifest @@ -0,0 +1,46 @@ + + + + + + + + + $placeholder$ + User Name + $placeholder$.png + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Platforms/Windows/app.manifest b/Platforms/Windows/app.manifest new file mode 100644 index 0000000..2da12c4 --- /dev/null +++ b/Platforms/Windows/app.manifest @@ -0,0 +1,15 @@ + + + + + + + + true/PM + PerMonitorV2, PerMonitor + + + diff --git a/Platforms/iOS/AppDelegate.cs b/Platforms/iOS/AppDelegate.cs new file mode 100644 index 0000000..9f49fad --- /dev/null +++ b/Platforms/iOS/AppDelegate.cs @@ -0,0 +1,10 @@ +using Foundation; + +namespace MauiApp1 +{ + [Register("AppDelegate")] + public class AppDelegate : MauiUIApplicationDelegate + { + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } +} diff --git a/Platforms/iOS/Info.plist b/Platforms/iOS/Info.plist new file mode 100644 index 0000000..ecb7f71 --- /dev/null +++ b/Platforms/iOS/Info.plist @@ -0,0 +1,32 @@ + + + + + LSRequiresIPhoneOS + + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/appicon.appiconset + + diff --git a/Platforms/iOS/Program.cs b/Platforms/iOS/Program.cs new file mode 100644 index 0000000..c13a69b --- /dev/null +++ b/Platforms/iOS/Program.cs @@ -0,0 +1,16 @@ +using ObjCRuntime; +using UIKit; + +namespace MauiApp1 +{ + 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)); + } + } +} diff --git a/Platforms/iOS/Resources/PrivacyInfo.xcprivacy b/Platforms/iOS/Resources/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..24ab3b4 --- /dev/null +++ b/Platforms/iOS/Resources/PrivacyInfo.xcprivacy @@ -0,0 +1,51 @@ + + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryDiskSpace + NSPrivacyAccessedAPITypeReasons + + E174.1 + + + + + + diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json new file mode 100644 index 0000000..4f85793 --- /dev/null +++ b/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "Windows Machine": { + "commandName": "Project", + "nativeDebugging": false + } + } +} \ No newline at end of file diff --git a/Resources/AppIcon/appicon.svg b/Resources/AppIcon/appicon.svg new file mode 100644 index 0000000..9d63b65 --- /dev/null +++ b/Resources/AppIcon/appicon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Resources/AppIcon/appiconfg.svg b/Resources/AppIcon/appiconfg.svg new file mode 100644 index 0000000..21dfb25 --- /dev/null +++ b/Resources/AppIcon/appiconfg.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Resources/Fonts/OpenSans-Regular.ttf b/Resources/Fonts/OpenSans-Regular.ttf new file mode 100644 index 0000000..68fcd94 Binary files /dev/null and b/Resources/Fonts/OpenSans-Regular.ttf differ diff --git a/Resources/Images/dotnet_bot.svg b/Resources/Images/dotnet_bot.svg new file mode 100644 index 0000000..abfaff2 --- /dev/null +++ b/Resources/Images/dotnet_bot.svg @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Resources/Raw/AboutAssets.txt b/Resources/Raw/AboutAssets.txt new file mode 100644 index 0000000..6de1c15 --- /dev/null +++ b/Resources/Raw/AboutAssets.txt @@ -0,0 +1,15 @@ +Any raw assets you want to be deployed with your application can be placed in +this directory (and child directories). Deployment of the asset to your application +is automatically handled by the following `MauiAsset` Build Action within your `.csproj`. + + + +These files will be deployed with your package and will be accessible using Essentials: + + async Task LoadMauiAsset() + { + using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt"); + using var reader = new StreamReader(stream); + + var contents = reader.ReadToEnd(); + } diff --git a/Resources/Splash/splash.svg b/Resources/Splash/splash.svg new file mode 100644 index 0000000..21dfb25 --- /dev/null +++ b/Resources/Splash/splash.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/wwwroot/css/app.css b/wwwroot/css/app.css new file mode 100644 index 0000000..cc59fb5 --- /dev/null +++ b/wwwroot/css/app.css @@ -0,0 +1,88 @@ +/*#if (SampleContent)*/ +html, body { + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; +} + +a, .btn-link { + color: #006bb7; +} + +.btn-primary { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus { + box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb; +} + +.content { + padding-top: 1.1rem; +} + +/*#endif*/ +h1:focus { + outline: none; +} + +.valid.modified:not([type=checkbox]) { + outline: 1px solid #26b050; +} + +.invalid { + outline: 1px solid #e50000; +} + +.validation-message { + color: #e50000; +} + +#blazor-error-ui { + background: lightyellow; + bottom: 0; + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); + display: none; + left: 0; + padding: 0.6rem 1.25rem 0.7rem 1.25rem; + position: fixed; + width: 100%; + z-index: 1000; +} + + #blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: 0.75rem; + top: 0.5rem; + } + +.blazor-error-boundary { + background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9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MjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121; + padding: 1rem 1rem 1rem 3.7rem; + color: white; +} + + .blazor-error-boundary::after { + content: "An error has occurred." + } + +.status-bar-safe-area { + display: none; +} + +@supports (-webkit-touch-callout: none) { + .status-bar-safe-area { + display: flex; + position: sticky; + top: 0; + height: env(safe-area-inset-top); + background-color: #f7f7f7; + width: 100%; + z-index: 1; + } + + .flex-column, .navbar-brand { + padding-left: env(safe-area-inset-left); + } +} diff --git a/wwwroot/index.html b/wwwroot/index.html new file mode 100644 index 0000000..478af24 --- /dev/null +++ b/wwwroot/index.html @@ -0,0 +1,29 @@ + + + + + + MauiApp1 + + + + + + + + +
+ +
Loading...
+ +
+ An unhandled error has occurred. + Reload + 🗙 +
+ + + + + + \ No newline at end of file