├── src ├── global.json ├── App.xaml.cs ├── MahApps.Metro.netcoreapp30.csproj ├── MainWindow.xaml.cs ├── AssemblyTextFileReader.cs ├── MahApps.Metro.netcoreapp30.sln ├── MainWindow.xaml ├── app.manifest └── App.xaml ├── screenshot01.png ├── screenshot02.png ├── .github └── FUNDING.yml ├── README.md ├── LICENSE └── .gitignore /src/global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "3.1.*" 4 | } 5 | } -------------------------------------------------------------------------------- /screenshot01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/punker76/MahApps.Metro.netcoreapp30/HEAD/screenshot01.png -------------------------------------------------------------------------------- /screenshot02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/punker76/MahApps.Metro.netcoreapp30/HEAD/screenshot02.png -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [punker76] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | -------------------------------------------------------------------------------- /src/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using ControlzEx.Theming; 3 | 4 | namespace MahApps.Metro.netcoreapp30 5 | { 6 | /// 7 | /// Interaction logic for App.xaml 8 | /// 9 | public partial class App : Application 10 | { 11 | protected override void OnStartup(StartupEventArgs e) 12 | { 13 | base.OnStartup(e); 14 | 15 | ThemeManager.Current.ThemeSyncMode = ThemeSyncMode.SyncWithAppMode; 16 | ThemeManager.Current.SyncTheme(ThemeSyncMode.SyncWithAppMode); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MahApps.Metro.netcoreapp30 2 | 3 | Hello .NET Core 3 together with `MahApps.Metro` (v2.0 alpha)! 4 | 5 | ## Prerequisites 6 | 7 | - [Visual Studio 2019 16.5.x or Preview](https://visualstudio.microsoft.com) 8 | - at least [.NET Core 3.x SDK (and runtime)](https://dotnet.microsoft.com/download) 9 | 10 | ## Clone the repo 11 | 12 | ```bash 13 | λ git clone https://github.com/punker76/MahApps.Metro.netcoreapp30.git 14 | ``` 15 | 16 | ## Build the app inside the cloned *src* folder 17 | 18 | ```bash 19 | λ dotnet build 20 | ``` 21 | 22 | ## Run the app 23 | 24 | ```bash 25 | λ dotnet run 26 | ``` 27 | 28 | ![screenshot01](https://github.com/punker76/MahApps.Metro.netcoreapp30/raw/master/screenshot01.png) 29 | 30 | ![screenshot02](https://github.com/punker76/MahApps.Metro.netcoreapp30/raw/master/screenshot02.png) 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Jan Karger 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 all 13 | 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 THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/MahApps.Metro.netcoreapp30.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | WinExe 5 | netcoreapp3.1 6 | true 7 | app.manifest 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using System.Reflection; 3 | using System.Windows; 4 | using MahApps.Metro.Controls; 5 | 6 | namespace MahApps.Metro.netcoreapp30 7 | { 8 | /// 9 | /// Interaction logic for MainWindow.xaml 10 | /// 11 | public partial class MainWindow : MetroWindow 12 | { 13 | public MainWindow() 14 | { 15 | InitializeComponent(); 16 | 17 | this.Loaded += MainWindow_Loaded; 18 | } 19 | 20 | private async void MainWindow_Loaded(object sender, RoutedEventArgs e) 21 | { 22 | var reader = new AssemblyTextFileReader(Assembly.GetExecutingAssembly()); 23 | var readme = await reader.ReadFileAsync("README.md"); 24 | this.Viewer.Markdown = readme; 25 | } 26 | 27 | private void OpenHyperlink(object sender, System.Windows.Input.ExecutedRoutedEventArgs e) 28 | { 29 | Process.Start("explorer.exe", e.Parameter.ToString()); 30 | } 31 | 32 | private void ButtonExit_Click(object sender, RoutedEventArgs e) 33 | { 34 | Application.Current.Shutdown(); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/AssemblyTextFileReader.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Linq; 4 | using System.Reflection; 5 | using System.Threading.Tasks; 6 | 7 | namespace MahApps.Metro.netcoreapp30 8 | { 9 | public static class AssemblyExtensions 10 | { 11 | public static string GetManifestResourceName(this Assembly assembly, string fileName) 12 | { 13 | string name = assembly.GetManifestResourceNames().SingleOrDefault(n => n.EndsWith(fileName, StringComparison.InvariantCultureIgnoreCase)); 14 | 15 | if (string.IsNullOrEmpty(name)) 16 | { 17 | throw new FileNotFoundException($"Embedded file '{fileName}' could not be found in assembly '{assembly.FullName}'.", fileName); 18 | } 19 | 20 | return name; 21 | } 22 | } 23 | 24 | public class AssemblyTextFileReader 25 | { 26 | private readonly Assembly _assembly; 27 | 28 | public AssemblyTextFileReader(Assembly assembly) 29 | { 30 | _assembly = assembly ?? throw new ArgumentNullException(nameof(assembly)); 31 | } 32 | 33 | public async Task ReadFileAsync(string fileName) 34 | { 35 | var resourceName = _assembly.GetManifestResourceName(fileName); 36 | 37 | using (var stream = _assembly.GetManifestResourceStream(resourceName)) 38 | { 39 | using (var reader = new StreamReader(stream)) 40 | { 41 | return await reader.ReadToEndAsync(); 42 | } 43 | } 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /src/MahApps.Metro.netcoreapp30.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29911.84 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MahApps.Metro.netcoreapp30", "MahApps.Metro.netcoreapp30.csproj", "{E8FD90CC-6911-4DC6-9399-ED43D906F485}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Debug|x64 = Debug|x64 12 | Debug|x86 = Debug|x86 13 | Release|Any CPU = Release|Any CPU 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 21 | {E8FD90CC-6911-4DC6-9399-ED43D906F485}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {E8FD90CC-6911-4DC6-9399-ED43D906F485}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {E8FD90CC-6911-4DC6-9399-ED43D906F485}.Debug|x64.ActiveCfg = Debug|Any CPU 24 | {E8FD90CC-6911-4DC6-9399-ED43D906F485}.Debug|x64.Build.0 = Debug|Any CPU 25 | {E8FD90CC-6911-4DC6-9399-ED43D906F485}.Debug|x86.ActiveCfg = Debug|Any CPU 26 | {E8FD90CC-6911-4DC6-9399-ED43D906F485}.Debug|x86.Build.0 = Debug|Any CPU 27 | {E8FD90CC-6911-4DC6-9399-ED43D906F485}.Release|Any CPU.ActiveCfg = Release|Any CPU 28 | {E8FD90CC-6911-4DC6-9399-ED43D906F485}.Release|Any CPU.Build.0 = Release|Any CPU 29 | {E8FD90CC-6911-4DC6-9399-ED43D906F485}.Release|x64.ActiveCfg = Release|Any CPU 30 | {E8FD90CC-6911-4DC6-9399-ED43D906F485}.Release|x64.Build.0 = Release|Any CPU 31 | {E8FD90CC-6911-4DC6-9399-ED43D906F485}.Release|x86.ActiveCfg = Release|Any CPU 32 | {E8FD90CC-6911-4DC6-9399-ED43D906F485}.Release|x86.Build.0 = Release|Any CPU 33 | EndGlobalSection 34 | EndGlobal 35 | -------------------------------------------------------------------------------- /src/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 30 |