v1
This commit is contained in:
		
							
								
								
									
										8
									
								
								App.xaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								App.xaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					<Application xmlns="https://github.com/avaloniaui"
 | 
				
			||||||
 | 
					             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 | 
				
			||||||
 | 
					             x:Class="AvaloniaCoreRTDemo.App">
 | 
				
			||||||
 | 
					    <Application.Styles>
 | 
				
			||||||
 | 
					        <StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml"/>
 | 
				
			||||||
 | 
					        <StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml"/>
 | 
				
			||||||
 | 
					    </Application.Styles>
 | 
				
			||||||
 | 
					</Application>
 | 
				
			||||||
							
								
								
									
										24
									
								
								App.xaml.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								App.xaml.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
				
			|||||||
 | 
					using Avalonia;
 | 
				
			||||||
 | 
					using Avalonia.Controls.ApplicationLifetimes;
 | 
				
			||||||
 | 
					using Avalonia.Markup.Xaml;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace AvaloniaCoreRTDemo
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class App : Application
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public override void Initialize()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            AvaloniaXamlLoader.Load(this);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        public override void OnFrameworkInitializationCompleted()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                desktop.MainWindow = new MainWindow();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            base.OnFrameworkInitializationCompleted();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					   }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										19
									
								
								AvaloniaCoreRTDemo.csproj
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								AvaloniaCoreRTDemo.csproj
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
				
			|||||||
 | 
					<Project Sdk="Microsoft.NET.Sdk">
 | 
				
			||||||
 | 
					  <PropertyGroup>
 | 
				
			||||||
 | 
					    <OutputType>WinExe</OutputType>
 | 
				
			||||||
 | 
					    <TargetFramework>netcoreapp3.0</TargetFramework>
 | 
				
			||||||
 | 
					  </PropertyGroup>
 | 
				
			||||||
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
					    <Compile Update="**\*.xaml.cs">
 | 
				
			||||||
 | 
					      <DependentUpon>%(Filename)</DependentUpon>
 | 
				
			||||||
 | 
					    </Compile>
 | 
				
			||||||
 | 
					    <AvaloniaResource Include="**\*.xaml">
 | 
				
			||||||
 | 
					      <SubType>Designer</SubType>
 | 
				
			||||||
 | 
					    </AvaloniaResource>
 | 
				
			||||||
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
					    <PackageReference Include="Avalonia" Version="0.9.0" />
 | 
				
			||||||
 | 
					    <PackageReference Include="Avalonia.Desktop" Version="0.9.0" />
 | 
				
			||||||
 | 
					    <PackageReference Include="Microsoft.DotNet.ILCompiler" Version="1.0.0-alpha-*" />
 | 
				
			||||||
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					</Project>
 | 
				
			||||||
							
								
								
									
										25
									
								
								AvaloniaCoreRTDemo.sln
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								AvaloniaCoreRTDemo.sln
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					Microsoft Visual Studio Solution File, Format Version 12.00
 | 
				
			||||||
 | 
					# Visual Studio Version 16
 | 
				
			||||||
 | 
					VisualStudioVersion = 16.0.29911.98
 | 
				
			||||||
 | 
					MinimumVisualStudioVersion = 10.0.40219.1
 | 
				
			||||||
 | 
					Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AvaloniaCoreRTDemo", "AvaloniaCoreRTDemo.csproj", "{41A52A04-F7D8-4981-9546-DB020E54851D}"
 | 
				
			||||||
 | 
					EndProject
 | 
				
			||||||
 | 
					Global
 | 
				
			||||||
 | 
						GlobalSection(SolutionConfigurationPlatforms) = preSolution
 | 
				
			||||||
 | 
							Debug|Any CPU = Debug|Any CPU
 | 
				
			||||||
 | 
							Release|Any CPU = Release|Any CPU
 | 
				
			||||||
 | 
						EndGlobalSection
 | 
				
			||||||
 | 
						GlobalSection(ProjectConfigurationPlatforms) = postSolution
 | 
				
			||||||
 | 
							{41A52A04-F7D8-4981-9546-DB020E54851D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 | 
				
			||||||
 | 
							{41A52A04-F7D8-4981-9546-DB020E54851D}.Debug|Any CPU.Build.0 = Debug|Any CPU
 | 
				
			||||||
 | 
							{41A52A04-F7D8-4981-9546-DB020E54851D}.Release|Any CPU.ActiveCfg = Release|Any CPU
 | 
				
			||||||
 | 
							{41A52A04-F7D8-4981-9546-DB020E54851D}.Release|Any CPU.Build.0 = Release|Any CPU
 | 
				
			||||||
 | 
						EndGlobalSection
 | 
				
			||||||
 | 
						GlobalSection(SolutionProperties) = preSolution
 | 
				
			||||||
 | 
							HideSolutionNode = FALSE
 | 
				
			||||||
 | 
						EndGlobalSection
 | 
				
			||||||
 | 
						GlobalSection(ExtensibilityGlobals) = postSolution
 | 
				
			||||||
 | 
							SolutionGuid = {E7112F2A-E8C2-4BD4-BA4F-413BCBC3C55A}
 | 
				
			||||||
 | 
						EndGlobalSection
 | 
				
			||||||
 | 
					EndGlobal
 | 
				
			||||||
							
								
								
									
										9
									
								
								MainWindow.xaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								MainWindow.xaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					<Window xmlns="https://github.com/avaloniaui"
 | 
				
			||||||
 | 
					        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 | 
				
			||||||
 | 
					        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
 | 
				
			||||||
 | 
					        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 | 
				
			||||||
 | 
					        mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
 | 
				
			||||||
 | 
					        x:Class="AvaloniaCoreRTDemo.MainWindow"
 | 
				
			||||||
 | 
					        Title="AvaloniaCoreRTDemo">
 | 
				
			||||||
 | 
					    Welcome to Avalonia!
 | 
				
			||||||
 | 
					</Window>
 | 
				
			||||||
							
								
								
									
										19
									
								
								MainWindow.xaml.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								MainWindow.xaml.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
				
			|||||||
 | 
					using Avalonia;
 | 
				
			||||||
 | 
					using Avalonia.Controls;
 | 
				
			||||||
 | 
					using Avalonia.Markup.Xaml;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace AvaloniaCoreRTDemo
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class MainWindow : Window
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public MainWindow()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            InitializeComponent();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private void InitializeComponent()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            AvaloniaXamlLoader.Load(this);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										23
									
								
								Program.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								Program.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using Avalonia;
 | 
				
			||||||
 | 
					using Avalonia.Controls;
 | 
				
			||||||
 | 
					using Avalonia.Controls.ApplicationLifetimes;
 | 
				
			||||||
 | 
					using Avalonia.Logging.Serilog;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace AvaloniaCoreRTDemo
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    class Program
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        // Initialization code. Don't use any Avalonia, third-party APIs or any
 | 
				
			||||||
 | 
					        // SynchronizationContext-reliant code before AppMain is called: things aren't initialized
 | 
				
			||||||
 | 
					        // yet and stuff might break.
 | 
				
			||||||
 | 
					        public static void Main(string[] args) => BuildAvaloniaApp()
 | 
				
			||||||
 | 
					            .StartWithClassicDesktopLifetime(args);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // Avalonia configuration, don't remove; also used by visual designer.
 | 
				
			||||||
 | 
					        public static AppBuilder BuildAvaloniaApp()
 | 
				
			||||||
 | 
					            => AppBuilder.Configure<App>()
 | 
				
			||||||
 | 
					                .UsePlatformDetect()
 | 
				
			||||||
 | 
					                .LogToDebug();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										8
									
								
								nuget.config
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								nuget.config
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<configuration>
 | 
				
			||||||
 | 
					  <packageSources>
 | 
				
			||||||
 | 
					    <add key="AvaloniaCI" value="https://www.myget.org/F/avalonia-ci/api/v2" />
 | 
				
			||||||
 | 
					    <add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
 | 
				
			||||||
 | 
					    <add key="nuget" value="https://api.nuget.org/v3/index.json" />
 | 
				
			||||||
 | 
					  </packageSources>
 | 
				
			||||||
 | 
					</configuration>
 | 
				
			||||||
		Reference in New Issue
	
	Block a user