9 | Swapping to Development environment will display more detailed information about the error that occurred.
10 |
11 |
12 | The Development environment shouldn't be enabled for deployed applications.
13 | It can result in displaying sensitive information from exceptions to end users.
14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
15 | and restarting the app.
16 |
24 |
25 | An error has occurred. This application may no longer respond until reloaded.
26 |
27 |
28 | An unhandled exception has occurred. See browser dev tools for details.
29 |
30 | Reload
31 | 🗙
32 |
2 |
3 | @Title
4 |
5 |
6 | Please take our
7 | brief survey
8 |
9 | and tell us what you think.
10 |
11 |
12 | @code {
13 | // Demonstrates how a parent component can supply parameters
14 | [Parameter]
15 | public string Title { get; set; }
16 | }
17 |
--------------------------------------------------------------------------------
/Blazor.WebView/Startup.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.DependencyInjection;
2 | using WebWindows.Blazor;
3 |
4 | namespace BlazorDesktopApp
5 | {
6 | public class Startup
7 | {
8 | public void ConfigureServices(IServiceCollection services)
9 | {
10 | }
11 |
12 | public void Configure(DesktopApplicationBuilder app)
13 | {
14 | app.AddComponent("app");
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Blazor.WebView/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using Microsoft.AspNetCore.Authorization
3 | @using Microsoft.AspNetCore.Components.Forms
4 | @using Microsoft.AspNetCore.Components.Routing
5 | @using Microsoft.AspNetCore.Components.Web
6 | @using Microsoft.JSInterop
7 | @using BlazorDesktopApp
8 | @using BlazorDesktopApp.Shared
9 |
--------------------------------------------------------------------------------
/Blazor.WebView/readme.md:
--------------------------------------------------------------------------------
1 | # Blazor WebView sample
2 |
3 | Blazor WebView is an experimantel solution by Steve Sanderson which serves Blazor or any other web application inside the native platform browser, like Safari or Edge. The solution is explained in detail by Steve Sanderson in a [blog post](https://blog.stevensanderson.com/2019/11/18/2019-11-18-webwindow-a-cross-platform-webview-for-dotnet-core/). You can find the project on GitHub https://github.com/SteveSandersonMS/WebWindow where I got the sample.
4 |
5 | # Running the sample
6 |
7 | Running the sample requires the installation of the .NET Core SDK 3.1.3 (3.1.201) https://dotnet.microsoft.com/download/dotnet-core/3.1
8 |
9 | The sample is simply started using `dotnet run`
10 |
11 | # License
12 |
13 | The sample is originally by Steve Sanderson, published under [Apache License 2.0](https://github.com/SteveSandersonMS/WebWindow/blob/master/LICENSE.txt) on [GitHub](https://github.com/SteveSandersonMS/WebWindow/tree/master/samples/BlazorDesktopApp).
--------------------------------------------------------------------------------
/Blazor.WebView/wwwroot/css/open-iconic/ICON-LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Waybury
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/Blazor.WebView/wwwroot/css/open-iconic/font/fonts/open-iconic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/Blazor.WebView/wwwroot/css/open-iconic/font/fonts/open-iconic.eot
--------------------------------------------------------------------------------
/Blazor.WebView/wwwroot/css/open-iconic/font/fonts/open-iconic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/Blazor.WebView/wwwroot/css/open-iconic/font/fonts/open-iconic.otf
--------------------------------------------------------------------------------
/Blazor.WebView/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/Blazor.WebView/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf
--------------------------------------------------------------------------------
/Blazor.WebView/wwwroot/css/open-iconic/font/fonts/open-iconic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/Blazor.WebView/wwwroot/css/open-iconic/font/fonts/open-iconic.woff
--------------------------------------------------------------------------------
/Blazor.WebView/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/Blazor.WebView/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/Blazor.WebView/wwwroot/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | MyDesktopApp
7 |
8 |
9 |
10 |
11 |
12 | Loading...
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Blazor.WebView/wwwroot/sample-data/weather.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "date": "2018-05-06",
4 | "temperatureC": 1,
5 | "summary": "Freezing",
6 | "temperatureF": 33
7 | },
8 | {
9 | "date": "2018-05-07",
10 | "temperatureC": 14,
11 | "summary": "Bracing",
12 | "temperatureF": 57
13 | },
14 | {
15 | "date": "2018-05-08",
16 | "temperatureC": -13,
17 | "summary": "Freezing",
18 | "temperatureF": 9
19 | },
20 | {
21 | "date": "2018-05-09",
22 | "temperatureC": -16,
23 | "summary": "Balmy",
24 | "temperatureF": 4
25 | },
26 | {
27 | "date": "2018-05-10",
28 | "temperatureC": -2,
29 | "summary": "Chilly",
30 | "temperatureF": 29
31 | }
32 | ]
33 |
--------------------------------------------------------------------------------
/BlazorPWA/App.razor:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Not found
8 |
9 |
2 |
3 | @Title
4 |
5 |
6 | Please take our
7 | brief survey
8 |
9 | and tell us what you think.
10 |
11 |
12 | @code {
13 | // Demonstrates how a parent component can supply parameters
14 | [Parameter]
15 | public string? Title { get; set; }
16 | }
17 |
--------------------------------------------------------------------------------
/BlazorPWA/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using System.Net.Http.Json
3 | @using Microsoft.AspNetCore.Components.Forms
4 | @using Microsoft.AspNetCore.Components.Routing
5 | @using Microsoft.AspNetCore.Components.Web
6 | @using Microsoft.AspNetCore.Components.Web.Virtualization
7 | @using Microsoft.AspNetCore.Components.WebAssembly.Http
8 | @using Microsoft.JSInterop
9 | @using BlazorPWA
10 | @using BlazorPWA.Shared
11 |
--------------------------------------------------------------------------------
/BlazorPWA/wwwroot/css/open-iconic/ICON-LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Waybury
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/BlazorPWA/wwwroot/css/open-iconic/font/fonts/open-iconic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/BlazorPWA/wwwroot/css/open-iconic/font/fonts/open-iconic.eot
--------------------------------------------------------------------------------
/BlazorPWA/wwwroot/css/open-iconic/font/fonts/open-iconic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/BlazorPWA/wwwroot/css/open-iconic/font/fonts/open-iconic.otf
--------------------------------------------------------------------------------
/BlazorPWA/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/BlazorPWA/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf
--------------------------------------------------------------------------------
/BlazorPWA/wwwroot/css/open-iconic/font/fonts/open-iconic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/BlazorPWA/wwwroot/css/open-iconic/font/fonts/open-iconic.woff
--------------------------------------------------------------------------------
/BlazorPWA/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/BlazorPWA/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/BlazorPWA/wwwroot/icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/BlazorPWA/wwwroot/icon-192.png
--------------------------------------------------------------------------------
/BlazorPWA/wwwroot/icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/BlazorPWA/wwwroot/icon-512.png
--------------------------------------------------------------------------------
/BlazorPWA/wwwroot/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | BlazorPWA
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Loading...
19 |
20 |
21 | An unhandled error has occurred.
22 | Reload
23 | 🗙
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/BlazorPWA/wwwroot/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "BlazorPWA",
3 | "short_name": "BlazorPWA",
4 | "start_url": "./",
5 | "display": "standalone",
6 | "background_color": "#ffffff",
7 | "theme_color": "#03173d",
8 | "prefer_related_applications": false,
9 | "icons": [
10 | {
11 | "src": "icon-512.png",
12 | "type": "image/png",
13 | "sizes": "512x512"
14 | },
15 | {
16 | "src": "icon-192.png",
17 | "type": "image/png",
18 | "sizes": "192x192"
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/BlazorPWA/wwwroot/sample-data/weather.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "date": "2018-05-06",
4 | "temperatureC": 1,
5 | "summary": "Freezing"
6 | },
7 | {
8 | "date": "2018-05-07",
9 | "temperatureC": 14,
10 | "summary": "Bracing"
11 | },
12 | {
13 | "date": "2018-05-08",
14 | "temperatureC": -13,
15 | "summary": "Freezing"
16 | },
17 | {
18 | "date": "2018-05-09",
19 | "temperatureC": -16,
20 | "summary": "Balmy"
21 | },
22 | {
23 | "date": "2018-05-10",
24 | "temperatureC": -2,
25 | "summary": "Chilly"
26 | }
27 | ]
28 |
--------------------------------------------------------------------------------
/BlazorPWA/wwwroot/service-worker.js:
--------------------------------------------------------------------------------
1 | // In development, always fetch from the network and do not enable offline support.
2 | // This is because caching would make development more difficult (changes would not
3 | // be reflected on the first load after each change).
4 | self.addEventListener('fetch', () => { });
5 |
--------------------------------------------------------------------------------
/DotNetNative/MacCatalyst/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | namespace MacCatalyst;
2 |
3 | [Register ("AppDelegate")]
4 | public class AppDelegate : UIApplicationDelegate {
5 | public override UIWindow? Window {
6 | get;
7 | set;
8 | }
9 |
10 | public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
11 | {
12 | // create a new window instance based on the screen size
13 | Window = new UIWindow (UIScreen.MainScreen.Bounds);
14 |
15 | // create a UIViewController with a single UILabel
16 | var vc = new UIViewController ();
17 | vc.View!.AddSubview (new UILabel (Window!.Frame) {
18 | BackgroundColor = UIColor.White,
19 | TextAlignment = UITextAlignment.Center,
20 | Text = "Hello, Catalyst!"
21 | });
22 | Window.RootViewController = vc;
23 |
24 | // make the window visible
25 | Window.MakeKeyAndVisible ();
26 |
27 | return true;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/DotNetNative/MacCatalyst/Assets.xcassets/AppIcon.appiconset/Icon1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/MacCatalyst/Assets.xcassets/AppIcon.appiconset/Icon1024.png
--------------------------------------------------------------------------------
/DotNetNative/MacCatalyst/Assets.xcassets/AppIcon.appiconset/Icon128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/MacCatalyst/Assets.xcassets/AppIcon.appiconset/Icon128.png
--------------------------------------------------------------------------------
/DotNetNative/MacCatalyst/Assets.xcassets/AppIcon.appiconset/Icon16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/MacCatalyst/Assets.xcassets/AppIcon.appiconset/Icon16.png
--------------------------------------------------------------------------------
/DotNetNative/MacCatalyst/Assets.xcassets/AppIcon.appiconset/Icon256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/MacCatalyst/Assets.xcassets/AppIcon.appiconset/Icon256.png
--------------------------------------------------------------------------------
/DotNetNative/MacCatalyst/Assets.xcassets/AppIcon.appiconset/Icon32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/MacCatalyst/Assets.xcassets/AppIcon.appiconset/Icon32.png
--------------------------------------------------------------------------------
/DotNetNative/MacCatalyst/Assets.xcassets/AppIcon.appiconset/Icon512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/MacCatalyst/Assets.xcassets/AppIcon.appiconset/Icon512.png
--------------------------------------------------------------------------------
/DotNetNative/MacCatalyst/Assets.xcassets/AppIcon.appiconset/Icon64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/MacCatalyst/Assets.xcassets/AppIcon.appiconset/Icon64.png
--------------------------------------------------------------------------------
/DotNetNative/MacCatalyst/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/DotNetNative/MacCatalyst/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDisplayName
6 | MacCatalyst
7 | CFBundleIdentifier
8 | com.companyname.MacCatalyst
9 | CFBundleShortVersionString
10 | 1.0
11 | CFBundleVersion
12 | 1.0
13 | LSMinimumSystemVersion
14 | 10.15.1
15 | UIDeviceFamily
16 |
17 | 2
18 |
19 | UISupportedInterfaceOrientations
20 |
21 | UIInterfaceOrientationPortrait
22 | UIInterfaceOrientationLandscapeLeft
23 | UIInterfaceOrientationLandscapeRight
24 |
25 | XSAppIconAssets
26 | Assets.xcassets/AppIcon.appiconset
27 |
28 |
--------------------------------------------------------------------------------
/DotNetNative/MacCatalyst/MacCatalyst.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | net6.0-maccatalyst
4 | maccatalyst-x64
5 | Exe
6 | enable
7 | true
8 |
9 |
10 |
--------------------------------------------------------------------------------
/DotNetNative/MacCatalyst/Main.cs:
--------------------------------------------------------------------------------
1 | using MacCatalyst;
2 |
3 | // This is the main entry point of the application.
4 | // If you want to use a different Application Delegate class from "AppDelegate"
5 | // you can specify it here.
6 | UIApplication.Main (args, null, typeof (AppDelegate));
7 |
--------------------------------------------------------------------------------
/DotNetNative/MacOs/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | namespace MacOs;
2 |
3 | [Register ("AppDelegate")]
4 | public class AppDelegate : NSApplicationDelegate {
5 | public override void DidFinishLaunching (NSNotification notification)
6 | {
7 | // Insert code here to initialize your application
8 | }
9 |
10 | public override void WillTerminate (NSNotification notification)
11 | {
12 | // Insert code here to tear down your application
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png
--------------------------------------------------------------------------------
/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png
--------------------------------------------------------------------------------
/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png
--------------------------------------------------------------------------------
/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png
--------------------------------------------------------------------------------
/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png
--------------------------------------------------------------------------------
/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png
--------------------------------------------------------------------------------
/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png
--------------------------------------------------------------------------------
/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png
--------------------------------------------------------------------------------
/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png
--------------------------------------------------------------------------------
/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/MacOs/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png
--------------------------------------------------------------------------------
/DotNetNative/MacOs/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/DotNetNative/MacOs/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/DotNetNative/MacOs/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleName
6 | MacOs
7 | CFBundleIdentifier
8 | com.companyname.MacOs
9 | CFBundleShortVersionString
10 | 1.0
11 | CFBundleVersion
12 | 1
13 | LSMinimumSystemVersion
14 | 10.14
15 | CFBundleDevelopmentRegion
16 | en
17 | CFBundleInfoDictionaryVersion
18 | 6.0
19 | CFBundlePackageType
20 | APPL
21 | CFBundleSignature
22 | ????
23 | NSHumanReadableCopyright
24 | ${AuthorCopyright:HtmlEncode}
25 | NSPrincipalClass
26 | NSApplication
27 | NSMainStoryboardFile
28 | Main
29 | XSAppIconAssets
30 | Assets.xcassets/AppIcon.appiconset
31 |
32 |
33 |
--------------------------------------------------------------------------------
/DotNetNative/MacOs/MacOs.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | net6.0-macos
4 | Exe
5 | enable
6 | true
7 |
8 |
--------------------------------------------------------------------------------
/DotNetNative/MacOs/Main.cs:
--------------------------------------------------------------------------------
1 | using MacOs;
2 |
3 | // This is the main entry point of the application.
4 | NSApplication.Init ();
5 | NSApplication.Main (args);
6 |
--------------------------------------------------------------------------------
/DotNetNative/MacOs/ViewController.cs:
--------------------------------------------------------------------------------
1 | namespace MacOs;
2 |
3 | public partial class ViewController : NSViewController {
4 | public ViewController (IntPtr handle) : base (handle)
5 | {
6 | }
7 |
8 | public override void ViewDidLoad ()
9 | {
10 | base.ViewDidLoad ();
11 |
12 | // Do any additional setup after loading the view.
13 | }
14 |
15 | public override NSObject RepresentedObject {
16 | get => base.RepresentedObject;
17 | set {
18 | base.RepresentedObject = value;
19 |
20 | // Update the view, if already loaded.
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/DotNetNative/MacOs/ViewController.designer.cs:
--------------------------------------------------------------------------------
1 | // WARNING
2 | //
3 | // This file has been generated automatically by Visual Studio to store outlets and
4 | // actions made in the UI designer. If it is removed, they will be lost.
5 | // Manual changes to this file may not be handled correctly.
6 | //
7 |
8 | namespace MacOs;
9 |
10 | [Register ("ViewController")]
11 | partial class ViewController {
12 | void ReleaseDesignerOutlets ()
13 | {
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/DotNetNative/WinUI/WinUI (Package)/Images/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/WinUI/WinUI (Package)/Images/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/DotNetNative/WinUI/WinUI (Package)/Images/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/WinUI/WinUI (Package)/Images/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/DotNetNative/WinUI/WinUI (Package)/Images/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/WinUI/WinUI (Package)/Images/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/DotNetNative/WinUI/WinUI (Package)/Images/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/WinUI/WinUI (Package)/Images/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/DotNetNative/WinUI/WinUI (Package)/Images/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/WinUI/WinUI (Package)/Images/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/DotNetNative/WinUI/WinUI (Package)/Images/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/WinUI/WinUI (Package)/Images/StoreLogo.png
--------------------------------------------------------------------------------
/DotNetNative/WinUI/WinUI (Package)/Images/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/DotNetNative/WinUI/WinUI (Package)/Images/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/DotNetNative/WinUI/WinUI/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/DotNetNative/WinUI/WinUI/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/DotNetNative/WinUI/WinUI/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml;
2 | using Microsoft.UI.Xaml.Controls;
3 | using Microsoft.UI.Xaml.Controls.Primitives;
4 | using Microsoft.UI.Xaml.Data;
5 | using Microsoft.UI.Xaml.Input;
6 | using Microsoft.UI.Xaml.Media;
7 | using Microsoft.UI.Xaml.Navigation;
8 | using System;
9 | using System.Collections.Generic;
10 | using System.IO;
11 | using System.Linq;
12 | using System.Runtime.InteropServices.WindowsRuntime;
13 | using Windows.Foundation;
14 | using Windows.Foundation.Collections;
15 |
16 | // To learn more about WinUI, the WinUI project structure,
17 | // and more about our project templates, see: http://aka.ms/winui-project-info.
18 |
19 | namespace WinUI
20 | {
21 | ///
22 | /// An empty window that can be used on its own or navigated to within a Frame.
23 | ///
24 | public sealed partial class MainWindow : Window
25 | {
26 | public MainWindow()
27 | {
28 | this.InitializeComponent();
29 | }
30 |
31 | private void myButton_Click(object sender, RoutedEventArgs e)
32 | {
33 | myButton.Content = "Clicked";
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/DotNetNative/WinUI/WinUI/WinUI.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | WinExe
4 | net5.0-windows10.0.19041.0
5 | 10.0.17763.0
6 | WinUI
7 | app.manifest
8 | x86;x64;arm64
9 | win10-x86;win10-x64;win10-arm64
10 | true
11 | C:\out\WinUI
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/DotNetNative/WinUI/WinUI/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 | true/PM
12 | PerMonitorV2, PerMonitor
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/DotNetNative/Wpf/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/DotNetNative/Wpf/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace Wpf
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/DotNetNative/Wpf/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | [assembly:ThemeInfo(
4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
5 | //(used if a resource is not found in the page,
6 | // or application resource dictionaries)
7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
8 | //(used if a resource is not found in the page,
9 | // app, or any theme specific resource dictionaries)
10 | )]
11 |
--------------------------------------------------------------------------------
/DotNetNative/Wpf/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/DotNetNative/Wpf/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 |
16 | namespace Wpf
17 | {
18 | ///
19 | /// Interaction logic for MainWindow.xaml
20 | ///
21 | public partial class MainWindow : Window
22 | {
23 | public MainWindow()
24 | {
25 | InitializeComponent();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/DotNetNative/Wpf/Wpf.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WinExe
5 | net6.0-windows
6 | true
7 |
8 |
9 |
--------------------------------------------------------------------------------
/DotNetNative/WpfHybrid/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/DotNetNative/WpfHybrid/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace WpfHybrid
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/DotNetNative/WpfHybrid/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | [assembly: ThemeInfo(
4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
5 | //(used if a resource is not found in the page,
6 | // or application resource dictionaries)
7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
8 | //(used if a resource is not found in the page,
9 | // app, or any theme specific resource dictionaries)
10 | )]
11 |
--------------------------------------------------------------------------------
/DotNetNative/WpfHybrid/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/DotNetNative/WpfHybrid/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 |
16 | namespace WpfHybrid
17 | {
18 | ///
19 | /// Interaction logic for MainWindow.xaml
20 | ///
21 | public partial class MainWindow : Window
22 | {
23 | public MainWindow()
24 | {
25 | InitializeComponent();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/DotNetNative/WpfHybrid/WpfHybrid.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WinExe
5 | net6.0-windows
6 | enable
7 | true
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Maui/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Maui;
2 | using Microsoft.Maui.Controls;
3 | using Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific;
4 | using Application = Microsoft.Maui.Controls.Application;
5 |
6 | namespace Maui
7 | {
8 | public partial class App : Application
9 | {
10 | public App()
11 | {
12 | InitializeComponent();
13 |
14 | MainPage = new MainPage();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Maui/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.Maui.Controls;
3 | using Microsoft.Maui.Essentials;
4 |
5 | namespace Maui
6 | {
7 | public partial class MainPage : ContentPage
8 | {
9 | int count = 0;
10 |
11 | public MainPage()
12 | {
13 | InitializeComponent();
14 |
15 | }
16 |
17 | private void OnCounterClicked(object sender, EventArgs e)
18 | {
19 | count++;
20 |
21 | CounterLabel.Text = $"Current count: {count}";
22 | SemanticScreenReader.Announce(CounterLabel.Text);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Maui/Maui.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}") = "Maui", "Maui.csproj", "{2BE58B29-59ED-4D70-8387-BE64A00215DA}"
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 | {2BE58B29-59ED-4D70-8387-BE64A00215DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {2BE58B29-59ED-4D70-8387-BE64A00215DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {2BE58B29-59ED-4D70-8387-BE64A00215DA}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
17 | {2BE58B29-59ED-4D70-8387-BE64A00215DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
18 | {2BE58B29-59ED-4D70-8387-BE64A00215DA}.Release|Any CPU.Build.0 = Release|Any CPU
19 | {2BE58B29-59ED-4D70-8387-BE64A00215DA}.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 |
--------------------------------------------------------------------------------
/Maui/MauiProgram.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Maui;
2 | using Microsoft.Maui.Hosting;
3 | using Microsoft.Maui.Controls.Compatibility;
4 | using Microsoft.Maui.Controls.Hosting;
5 |
6 | namespace Maui
7 | {
8 | public static class MauiProgram
9 | {
10 | public static MauiApp CreateMauiApp()
11 | {
12 | var builder = MauiApp.CreateBuilder();
13 | builder
14 | .UseMauiApp()
15 | .ConfigureFonts(fonts =>
16 | {
17 | fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
18 | });
19 |
20 | return builder.Build();
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/Maui/Platforms/MacCatalyst/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 | using Microsoft.Maui;
3 |
4 | namespace Maui
5 | {
6 | [Register("AppDelegate")]
7 | public class AppDelegate : MauiUIApplicationDelegate
8 | {
9 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
10 | }
11 | }
--------------------------------------------------------------------------------
/Maui/Platforms/MacCatalyst/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | LSMinimumSystemVersion
6 | 10.15
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 |
32 |
33 |
--------------------------------------------------------------------------------
/Maui/Platforms/MacCatalyst/Program.cs:
--------------------------------------------------------------------------------
1 | using UIKit;
2 |
3 | namespace Maui
4 | {
5 | public class Program
6 | {
7 | // This is the main entry point of the application.
8 | static void Main(string[] args)
9 | {
10 | // if you want to use a different Application Delegate class from "AppDelegate"
11 | // you can specify it here.
12 | UIApplication.Main(args, null, typeof(AppDelegate));
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/Maui/Platforms/Windows/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Maui/Platforms/Windows/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Maui;
2 | using Microsoft.UI.Xaml;
3 | using Windows.ApplicationModel;
4 |
5 | // To learn more about WinUI, the WinUI project structure,
6 | // and more about our project templates, see: http://aka.ms/winui-project-info.
7 |
8 | namespace Maui.WinUI
9 | {
10 | ///
11 | /// Provides application-specific behavior to supplement the default Application class.
12 | ///
13 | public partial class App : MauiWinUIApplication
14 | {
15 | ///
16 | /// Initializes the singleton application object. This is the first line of authored code
17 | /// executed, and as such is the logical equivalent of main() or WinMain().
18 | ///
19 | public App()
20 | {
21 | this.InitializeComponent();
22 | }
23 |
24 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
25 |
26 | protected override void OnLaunched(LaunchActivatedEventArgs args)
27 | {
28 | base.OnLaunched(args);
29 |
30 | Microsoft.Maui.Essentials.Platform.OnLaunched(args);
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Maui/Platforms/Windows/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 | true/PM
12 | PerMonitorV2, PerMonitor
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Maui/Platforms/iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 | using Microsoft.Maui;
3 |
4 | namespace Maui
5 | {
6 | [Register("AppDelegate")]
7 | public class AppDelegate : MauiUIApplicationDelegate
8 | {
9 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
10 | }
11 | }
--------------------------------------------------------------------------------
/Maui/Platforms/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | LSRequiresIPhoneOS
6 |
7 | MinimumOSVersion
8 | 10.3.4
9 | UIDeviceFamily
10 |
11 | 1
12 | 2
13 |
14 | UIRequiredDeviceCapabilities
15 |
16 | arm64
17 |
18 | UISupportedInterfaceOrientations
19 |
20 | UIInterfaceOrientationPortrait
21 | UIInterfaceOrientationLandscapeLeft
22 | UIInterfaceOrientationLandscapeRight
23 |
24 | UISupportedInterfaceOrientations~ipad
25 |
26 | UIInterfaceOrientationPortrait
27 | UIInterfaceOrientationPortraitUpsideDown
28 | UIInterfaceOrientationLandscapeLeft
29 | UIInterfaceOrientationLandscapeRight
30 |
31 | XSAppIconAssets
32 | Assets.xcassets/appicon.appiconset
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Maui/Platforms/iOS/Program.cs:
--------------------------------------------------------------------------------
1 | using UIKit;
2 |
3 | namespace Maui
4 | {
5 | public class Program
6 | {
7 | // This is the main entry point of the application.
8 | static void Main(string[] args)
9 | {
10 | // if you want to use a different Application Delegate class from "AppDelegate"
11 | // you can specify it here.
12 | UIApplication.Main(args, null, typeof(AppDelegate));
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/Maui/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "Windows Machine": {
4 | "commandName": "MsixPackage",
5 | "nativeDebugging": false
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/Maui/Resources/Fonts/OpenSans-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/Maui/Resources/Fonts/OpenSans-Regular.ttf
--------------------------------------------------------------------------------
/Maui/Resources/appicon.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/MauiBlazor/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Maui;
2 | using Microsoft.Maui.Controls;
3 | using Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific;
4 | using Application = Microsoft.Maui.Controls.Application;
5 |
6 | namespace MauiBlazor
7 | {
8 | public partial class App : Application
9 | {
10 | internal static AppState State { get; set; } = new AppState();
11 |
12 | public App()
13 | {
14 | InitializeComponent();
15 |
16 | MainPage = new MainPage();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/MauiBlazor/AppState.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace MauiBlazor
8 | {
9 | internal class AppState
10 | {
11 | public int Counter { get; private set; } = 0;
12 |
13 | public event EventHandler CounterChanged;
14 |
15 | public void IncrementCounter()
16 | {
17 | Counter++;
18 | CounterChanged?.Invoke(this, Counter);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/MauiBlazor/Data/WeatherForecast.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace MauiBlazor.Data
4 | {
5 | public class WeatherForecast
6 | {
7 | public DateTime Date { get; set; }
8 |
9 | public int TemperatureC { get; set; }
10 |
11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
12 |
13 | public string Summary { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/MauiBlazor/Data/WeatherForecastService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Threading.Tasks;
4 |
5 | namespace MauiBlazor.Data
6 | {
7 | public class WeatherForecastService
8 | {
9 | private static readonly string[] Summaries = new[]
10 | {
11 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
12 | };
13 |
14 | public Task GetForecastAsync(DateTime startDate)
15 | {
16 | var rng = new Random();
17 | return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast
18 | {
19 | Date = startDate.AddDays(index),
20 | TemperatureC = rng.Next(-20, 55),
21 | Summary = Summaries[rng.Next(Summaries.Length)]
22 | }).ToArray());
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/MauiBlazor/Main.razor:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
2 |
3 | @Title
4 |
5 |
6 | Please take our
7 | brief survey
8 |
9 | and tell us what you think.
10 |
11 |
12 | @code {
13 | // Demonstrates how a parent component can supply parameters
14 | [Parameter]
15 | public string Title { get; set; }
16 | }
17 |
--------------------------------------------------------------------------------
/MauiBlazor/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using Microsoft.AspNetCore.Components.Forms
3 | @using Microsoft.AspNetCore.Components.Routing
4 | @using Microsoft.AspNetCore.Components.Web
5 | @using Microsoft.AspNetCore.Components.Web.Virtualization
6 | @using Microsoft.JSInterop
7 | @using MauiBlazor
8 | @using MauiBlazor.Shared
9 |
--------------------------------------------------------------------------------
/MauiBlazor/wwwroot/css/open-iconic/ICON-LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Waybury
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/MauiBlazor/wwwroot/css/open-iconic/font/fonts/open-iconic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/MauiBlazor/wwwroot/css/open-iconic/font/fonts/open-iconic.eot
--------------------------------------------------------------------------------
/MauiBlazor/wwwroot/css/open-iconic/font/fonts/open-iconic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/MauiBlazor/wwwroot/css/open-iconic/font/fonts/open-iconic.otf
--------------------------------------------------------------------------------
/MauiBlazor/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/MauiBlazor/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf
--------------------------------------------------------------------------------
/MauiBlazor/wwwroot/css/open-iconic/font/fonts/open-iconic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krdmllr/DotNetDesktopSamples/0f3341e06ac251a2bb76f82dfc318779abca2a55/MauiBlazor/wwwroot/css/open-iconic/font/fonts/open-iconic.woff
--------------------------------------------------------------------------------
/MauiBlazor/wwwroot/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | MauiBlazor
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | An unhandled error has occurred.
18 | Reload
19 | 🗙
20 |