diff --git a/Samples/Onboarding/Hello World/Hello World.sln b/Samples/Onboarding/Hello World/Hello World.sln new file mode 100644 index 000000000..82a5cab64 --- /dev/null +++ b/Samples/Onboarding/Hello World/Hello World.sln @@ -0,0 +1,43 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.32929.385 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hello World", "Hello World\Hello World.csproj", "{D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|arm64 = Debug|arm64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|arm64 = Release|arm64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Debug|arm64.ActiveCfg = Debug|arm64 + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Debug|arm64.Build.0 = Debug|arm64 + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Debug|arm64.Deploy.0 = Debug|arm64 + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Debug|x64.ActiveCfg = Debug|x64 + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Debug|x64.Build.0 = Debug|x64 + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Debug|x64.Deploy.0 = Debug|x64 + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Debug|x86.ActiveCfg = Debug|x86 + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Debug|x86.Build.0 = Debug|x86 + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Debug|x86.Deploy.0 = Debug|x86 + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Release|arm64.ActiveCfg = Release|arm64 + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Release|arm64.Build.0 = Release|arm64 + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Release|arm64.Deploy.0 = Release|arm64 + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Release|x64.ActiveCfg = Release|x64 + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Release|x64.Build.0 = Release|x64 + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Release|x64.Deploy.0 = Release|x64 + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Release|x86.ActiveCfg = Release|x86 + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Release|x86.Build.0 = Release|x86 + {D0E0CA3B-5550-4981-BB5A-426AEFF7E6EF}.Release|x86.Deploy.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D5EB1AD9-4867-47B5-B6B5-18831C561613} + EndGlobalSection +EndGlobal diff --git a/Samples/Onboarding/Hello World/Hello World/App.xaml b/Samples/Onboarding/Hello World/Hello World/App.xaml new file mode 100644 index 000000000..f83c49127 --- /dev/null +++ b/Samples/Onboarding/Hello World/Hello World/App.xaml @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/Samples/Onboarding/Hello World/Hello World/App.xaml.cs b/Samples/Onboarding/Hello World/Hello World/App.xaml.cs new file mode 100644 index 000000000..12dc50f90 --- /dev/null +++ b/Samples/Onboarding/Hello World/Hello World/App.xaml.cs @@ -0,0 +1,51 @@ +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; +using Microsoft.UI.Xaml.Shapes; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +using Windows.Foundation; +using Windows.Foundation.Collections; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace Hello_World +{ + /// + /// Provides application-specific behavior to supplement the default Application class. + /// + public partial class App : Application + { + /// + /// 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(); + } + + /// + /// Invoked when the application is launched normally by the end user. Other entry points + /// will be used such as when the application is launched to open a specific file. + /// + /// Details about the launch request and process. + protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args) + { + m_window = new MainWindow(); + m_window.Activate(); + } + + private Window m_window; + } +} diff --git a/Samples/Onboarding/Hello World/Hello World/Assets/LockScreenLogo.scale-200.png b/Samples/Onboarding/Hello World/Hello World/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 000000000..7440f0d4b Binary files /dev/null and b/Samples/Onboarding/Hello World/Hello World/Assets/LockScreenLogo.scale-200.png differ diff --git a/Samples/Onboarding/Hello World/Hello World/Assets/SplashScreen.scale-200.png b/Samples/Onboarding/Hello World/Hello World/Assets/SplashScreen.scale-200.png new file mode 100644 index 000000000..32f486a86 Binary files /dev/null and b/Samples/Onboarding/Hello World/Hello World/Assets/SplashScreen.scale-200.png differ diff --git a/Samples/Onboarding/Hello World/Hello World/Assets/Square150x150Logo.scale-200.png b/Samples/Onboarding/Hello World/Hello World/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 000000000..53ee3777e Binary files /dev/null and b/Samples/Onboarding/Hello World/Hello World/Assets/Square150x150Logo.scale-200.png differ diff --git a/Samples/Onboarding/Hello World/Hello World/Assets/Square44x44Logo.scale-200.png b/Samples/Onboarding/Hello World/Hello World/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 000000000..f713bba67 Binary files /dev/null and b/Samples/Onboarding/Hello World/Hello World/Assets/Square44x44Logo.scale-200.png differ diff --git a/Samples/Onboarding/Hello World/Hello World/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/Samples/Onboarding/Hello World/Hello World/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 000000000..dc9f5bea0 Binary files /dev/null and b/Samples/Onboarding/Hello World/Hello World/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/Samples/Onboarding/Hello World/Hello World/Assets/StoreLogo.png b/Samples/Onboarding/Hello World/Hello World/Assets/StoreLogo.png new file mode 100644 index 000000000..a4586f26b Binary files /dev/null and b/Samples/Onboarding/Hello World/Hello World/Assets/StoreLogo.png differ diff --git a/Samples/Onboarding/Hello World/Hello World/Assets/Wide310x150Logo.scale-200.png b/Samples/Onboarding/Hello World/Hello World/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 000000000..8b4a5d0dd Binary files /dev/null and b/Samples/Onboarding/Hello World/Hello World/Assets/Wide310x150Logo.scale-200.png differ diff --git a/Samples/Onboarding/Hello World/Hello World/Hello World.csproj b/Samples/Onboarding/Hello World/Hello World/Hello World.csproj new file mode 100644 index 000000000..d13a76cc0 --- /dev/null +++ b/Samples/Onboarding/Hello World/Hello World/Hello World.csproj @@ -0,0 +1,48 @@ + + + WinExe + net6.0-windows10.0.19041.0 + 10.0.17763.0 + Hello_World + app.manifest + x86;x64;arm64 + win10-x86;win10-x64;win10-arm64 + win10-$(Platform).pubxml + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + true + + diff --git a/Samples/Onboarding/Hello World/Hello World/MainWindow.xaml b/Samples/Onboarding/Hello World/Hello World/MainWindow.xaml new file mode 100644 index 000000000..3c0c16741 --- /dev/null +++ b/Samples/Onboarding/Hello World/Hello World/MainWindow.xaml @@ -0,0 +1,13 @@ + + + + + + diff --git a/Samples/Onboarding/Hello World/Hello World/MainWindow.xaml.cs b/Samples/Onboarding/Hello World/Hello World/MainWindow.xaml.cs new file mode 100644 index 000000000..f75f8e8af --- /dev/null +++ b/Samples/Onboarding/Hello World/Hello World/MainWindow.xaml.cs @@ -0,0 +1,32 @@ +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace Hello_World +{ + /// + /// An empty window that can be used on its own or navigated to within a Frame. + /// + public sealed partial class MainWindow : Window + { + public MainWindow() + { + this.InitializeComponent(); + this.Title = "Hello world!"; + } + } +} diff --git a/Samples/Onboarding/Hello World/Hello World/Package.appxmanifest b/Samples/Onboarding/Hello World/Hello World/Package.appxmanifest new file mode 100644 index 000000000..ce35a5a4a --- /dev/null +++ b/Samples/Onboarding/Hello World/Hello World/Package.appxmanifest @@ -0,0 +1,48 @@ + + + + + + + + Hello World + mikben + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/Onboarding/Hello World/Hello World/Properties/PublishProfiles/win10-arm64.pubxml b/Samples/Onboarding/Hello World/Hello World/Properties/PublishProfiles/win10-arm64.pubxml new file mode 100644 index 000000000..a132e44c6 --- /dev/null +++ b/Samples/Onboarding/Hello World/Hello World/Properties/PublishProfiles/win10-arm64.pubxml @@ -0,0 +1,20 @@ + + + + + FileSystem + arm64 + win10-arm64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + False + True + + + \ No newline at end of file diff --git a/Samples/Onboarding/Hello World/Hello World/Properties/PublishProfiles/win10-x64.pubxml b/Samples/Onboarding/Hello World/Hello World/Properties/PublishProfiles/win10-x64.pubxml new file mode 100644 index 000000000..26ea7e55c --- /dev/null +++ b/Samples/Onboarding/Hello World/Hello World/Properties/PublishProfiles/win10-x64.pubxml @@ -0,0 +1,20 @@ + + + + + FileSystem + x64 + win10-x64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + False + True + + + \ No newline at end of file diff --git a/Samples/Onboarding/Hello World/Hello World/Properties/PublishProfiles/win10-x86.pubxml b/Samples/Onboarding/Hello World/Hello World/Properties/PublishProfiles/win10-x86.pubxml new file mode 100644 index 000000000..34d14d4d4 --- /dev/null +++ b/Samples/Onboarding/Hello World/Hello World/Properties/PublishProfiles/win10-x86.pubxml @@ -0,0 +1,20 @@ + + + + + FileSystem + x86 + win10-x86 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + False + True + + + \ No newline at end of file diff --git a/Samples/Onboarding/Hello World/Hello World/Properties/launchSettings.json b/Samples/Onboarding/Hello World/Hello World/Properties/launchSettings.json new file mode 100644 index 000000000..6b3514e81 --- /dev/null +++ b/Samples/Onboarding/Hello World/Hello World/Properties/launchSettings.json @@ -0,0 +1,10 @@ +{ + "profiles": { + "Hello World (Package)": { + "commandName": "MsixPackage" + }, + "Hello World (Unpackaged)": { + "commandName": "Project" + } + } +} \ No newline at end of file diff --git a/Samples/Onboarding/Hello World/Hello World/app.manifest b/Samples/Onboarding/Hello World/Hello World/app.manifest new file mode 100644 index 000000000..4e5ee6daf --- /dev/null +++ b/Samples/Onboarding/Hello World/Hello World/app.manifest @@ -0,0 +1,15 @@ + + + + + + + + true/PM + PerMonitorV2, PerMonitor + + + diff --git a/Samples/Onboarding/Hello World/README.md b/Samples/Onboarding/Hello World/README.md new file mode 100644 index 000000000..8f9fbda3f --- /dev/null +++ b/Samples/Onboarding/Hello World/README.md @@ -0,0 +1 @@ +This solution provides the source code that corresponds to our WIP "How to build a Hello World WinUI 3 app" how-to. \ No newline at end of file diff --git a/Samples/Onboarding/README.md b/Samples/Onboarding/README.md new file mode 100644 index 000000000..e7d22414f --- /dev/null +++ b/Samples/Onboarding/README.md @@ -0,0 +1 @@ +This folder contains beginner-oriented samples that support the scenarios documented within the How-Tos node of the Windows App SDK conceptual corpus. \ No newline at end of file