diff --git a/Semi.Avalonia.sln b/Semi.Avalonia.sln index 43979a1..fe4a382 100644 --- a/Semi.Avalonia.sln +++ b/Semi.Avalonia.sln @@ -3,9 +3,21 @@ 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}") = "Semi.Avalonia", "src\Semi.Avalonia\Semi.Avalonia.csproj", "{90D0B063-BC64-40AB-A56C-AC11909CF410}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia", "src\Semi.Avalonia\Semi.Avalonia.csproj", "{90D0B063-BC64-40AB-A56C-AC11909CF410}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semi.Avalonia.Demo", "src\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj", "{799F311A-7376-4C90-B468-B7E7FFC1AF59}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{B1E6A7D4-0AFB-4D32-9969-5FBDAC0CFF3E}" + ProjectSection(SolutionItems) = preProject + demo\Directory.Build.props = demo\Directory.Build.props + demo\global.json = demo\global.json + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demo", "Demo", "{43091528-9509-43CB-A003-9C5C11E96DD6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo.Desktop", "demo\Semi.Avalonia.Demo.Desktop\Semi.Avalonia.Demo.Desktop.csproj", "{2ADCA724-2B6D-46EC-87F7-604D7918B89A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo.Web", "demo\Semi.Avalonia.Demo.Web\Semi.Avalonia.Demo.Web.csproj", "{69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo", "demo\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj", "{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -17,14 +29,27 @@ Global {90D0B063-BC64-40AB-A56C-AC11909CF410}.Debug|Any CPU.Build.0 = Debug|Any CPU {90D0B063-BC64-40AB-A56C-AC11909CF410}.Release|Any CPU.ActiveCfg = Release|Any CPU {90D0B063-BC64-40AB-A56C-AC11909CF410}.Release|Any CPU.Build.0 = Release|Any CPU - {799F311A-7376-4C90-B468-B7E7FFC1AF59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {799F311A-7376-4C90-B468-B7E7FFC1AF59}.Debug|Any CPU.Build.0 = Debug|Any CPU - {799F311A-7376-4C90-B468-B7E7FFC1AF59}.Release|Any CPU.ActiveCfg = Release|Any CPU - {799F311A-7376-4C90-B468-B7E7FFC1AF59}.Release|Any CPU.Build.0 = Release|Any CPU + {2ADCA724-2B6D-46EC-87F7-604D7918B89A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2ADCA724-2B6D-46EC-87F7-604D7918B89A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2ADCA724-2B6D-46EC-87F7-604D7918B89A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2ADCA724-2B6D-46EC-87F7-604D7918B89A}.Release|Any CPU.Build.0 = Release|Any CPU + {69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0}.Release|Any CPU.Build.0 = Release|Any CPU + {D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {2ADCA724-2B6D-46EC-87F7-604D7918B89A} = {43091528-9509-43CB-A003-9C5C11E96DD6} + {69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0} = {43091528-9509-43CB-A003-9C5C11E96DD6} + {D789AEDB-EBDF-4450-8E8E-B4A03FB257B0} = {43091528-9509-43CB-A003-9C5C11E96DD6} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7CA41ED3-2CED-40CC-AA21-28C3B42B1E86} EndGlobalSection diff --git a/demo/Directory.Build.props b/demo/Directory.Build.props new file mode 100644 index 0000000..6da774b --- /dev/null +++ b/demo/Directory.Build.props @@ -0,0 +1,6 @@ + + + enable + 11.0.0-preview4 + + diff --git a/src/Semi.Avalonia.Demo/App.axaml b/demo/Semi.Avalonia.Demo.Desktop/App.axaml similarity index 52% rename from src/Semi.Avalonia.Demo/App.axaml rename to demo/Semi.Avalonia.Demo.Desktop/App.axaml index e381db9..1bcd897 100644 --- a/src/Semi.Avalonia.Demo/App.axaml +++ b/demo/Semi.Avalonia.Demo.Desktop/App.axaml @@ -1,8 +1,9 @@ + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="using:Semi.Avalonia.Demo.Desktop"> - + \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo.Desktop/App.axaml.cs b/demo/Semi.Avalonia.Demo.Desktop/App.axaml.cs new file mode 100644 index 0000000..d5fe94a --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Desktop/App.axaml.cs @@ -0,0 +1,23 @@ +using Avalonia; +using Avalonia.Controls.ApplicationLifetimes; +using Avalonia.Markup.Xaml; +using Semi.Avalonia.Demo.Views; + +namespace Semi.Avalonia.Demo.Desktop; + +public partial 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(); + } +} \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo.Desktop/Program.cs b/demo/Semi.Avalonia.Demo.Desktop/Program.cs new file mode 100644 index 0000000..63a313a --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Desktop/Program.cs @@ -0,0 +1,31 @@ +using System; +using Avalonia; +using Avalonia.Media; + +namespace Semi.Avalonia.Demo.Desktop; + +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. + [STAThread] + public static void Main(string[] args) => BuildAvaloniaApp() + .With(new FontManagerOptions + { + FontFallbacks = new[] + { + new FontFallback + { + FontFamily = new FontFamily("Microsoft YaHei") + } + } + }) + .StartWithClassicDesktopLifetime(args); + + // Avalonia configuration, don't remove; also used by visual designer. + public static AppBuilder BuildAvaloniaApp() + => AppBuilder.Configure() + .UsePlatformDetect() + .LogToTrace(); +} diff --git a/demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj b/demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj new file mode 100644 index 0000000..755d353 --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj @@ -0,0 +1,22 @@ + + + WinExe + net7.0 + enable + true + + + + app.manifest + + + + + + + + + + + + diff --git a/demo/Semi.Avalonia.Demo.Desktop/app.manifest b/demo/Semi.Avalonia.Demo.Desktop/app.manifest new file mode 100644 index 0000000..428fcd2 --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Desktop/app.manifest @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/demo/Semi.Avalonia.Demo.Web/App.axaml b/demo/Semi.Avalonia.Demo.Web/App.axaml new file mode 100644 index 0000000..834f547 --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Web/App.axaml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo.Web/App.axaml.cs b/demo/Semi.Avalonia.Demo.Web/App.axaml.cs new file mode 100644 index 0000000..5638d50 --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Web/App.axaml.cs @@ -0,0 +1,23 @@ +using Avalonia; +using Avalonia.Controls.ApplicationLifetimes; +using Avalonia.Markup.Xaml; +using Semi.Avalonia.Demo.Views; + +namespace Semi.Avalonia.Demo.Web; + +public partial class App : Application +{ + public override void Initialize() + { + AvaloniaXamlLoader.Load(this); + } + + public override void OnFrameworkInitializationCompleted() + { + if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewPlatform) + { + singleViewPlatform.MainView = new MainView(); + } + base.OnFrameworkInitializationCompleted(); + } +} \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo.Web/AppBundle/Logo.svg b/demo/Semi.Avalonia.Demo.Web/AppBundle/Logo.svg new file mode 100644 index 0000000..9685a23 --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Web/AppBundle/Logo.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/demo/Semi.Avalonia.Demo.Web/AppBundle/app.css b/demo/Semi.Avalonia.Demo.Web/AppBundle/app.css new file mode 100644 index 0000000..027ea8f --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Web/AppBundle/app.css @@ -0,0 +1,67 @@ +/* HTML styles for the splash screen */ + +.highlight { + color: white; + font-size: 2.5rem; + display: block; +} + +.purple { + color: #8b44ac; +} + +.icon { + opacity: 0.05; + height: 35%; + width: 35%; + position: absolute; + background-repeat: no-repeat; + right: 0px; + bottom: 0px; + margin-right: 3%; + margin-bottom: 5%; + z-index: 5000; + background-position: right bottom; + pointer-events: none; +} + +#avalonia-splash a { + color: whitesmoke; + text-decoration: none; +} + +.center { + display: flex; + justify-content: center; + align-items: center; + height: 100vh; +} + +#avalonia-splash { + position: relative; + height: 100%; + width: 100%; + color: whitesmoke; + background: #1b2a4e; + font-family: 'Nunito', sans-serif; + background-position: center; + background-size: cover; + background-repeat: no-repeat; + justify-content: center; + align-items: center; +} + +.splash-close { + animation: fadeout 0.25s linear forwards; +} + +@keyframes fadeout { + 0% { + opacity: 100%; + } + + 100% { + opacity: 0; + visibility: collapse; + } +} diff --git a/demo/Semi.Avalonia.Demo.Web/AppBundle/favicon.ico b/demo/Semi.Avalonia.Demo.Web/AppBundle/favicon.ico new file mode 100644 index 0000000..da8d49f Binary files /dev/null and b/demo/Semi.Avalonia.Demo.Web/AppBundle/favicon.ico differ diff --git a/demo/Semi.Avalonia.Demo.Web/AppBundle/index.html b/demo/Semi.Avalonia.Demo.Web/AppBundle/index.html new file mode 100644 index 0000000..c90e26c --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Web/AppBundle/index.html @@ -0,0 +1,31 @@ + + + + + Semi.Avalonia.Demo.Web + + + + + + + + + + + +
+
+
+

+ Powered by + Avalonia UI +

+
+ Avalonia Logo +
+
+ + + + \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo.Web/AppBundle/main.js b/demo/Semi.Avalonia.Demo.Web/AppBundle/main.js new file mode 100644 index 0000000..2426ede --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Web/AppBundle/main.js @@ -0,0 +1,16 @@ +import { dotnet } from './dotnet.js' +import { registerAvaloniaModule } from './avalonia.js'; + +const is_browser = typeof window != "undefined"; +if (!is_browser) throw new Error(`Expected to be running in a browser`); + +const dotnetRuntime = await dotnet + .withDiagnosticTracing(false) + .withApplicationArgumentsFromQuery() + .create(); + +await registerAvaloniaModule(dotnetRuntime); + +const config = dotnetRuntime.getConfig(); + +await dotnetRuntime.runMainAndExit(config.mainAssemblyName, [window.location.search]); \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo.Web/Assets/SourceHanSansCN-Regular.otf b/demo/Semi.Avalonia.Demo.Web/Assets/SourceHanSansCN-Regular.otf new file mode 100644 index 0000000..c13789b Binary files /dev/null and b/demo/Semi.Avalonia.Demo.Web/Assets/SourceHanSansCN-Regular.otf differ diff --git a/demo/Semi.Avalonia.Demo.Web/Program.cs b/demo/Semi.Avalonia.Demo.Web/Program.cs new file mode 100644 index 0000000..d591560 --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Web/Program.cs @@ -0,0 +1,26 @@ +using System.Runtime.Versioning; +using Avalonia; +using Avalonia.Media; +using Avalonia.Web; +using Semi.Avalonia.Demo.Web; + +[assembly: SupportedOSPlatform("browser")] + +internal partial class Program +{ + private static void Main(string[] args) => BuildAvaloniaApp() + .With(new FontManagerOptions + { + FontFallbacks = new[] + { + new FontFallback + { + FontFamily = new FontFamily("avares://Semi.Avalonia.Demo.Web/Assets/SourceHanSansCN-Regular.otf#Source Han Sans CN") + } + } + }) + .SetupBrowserApp("out"); + + public static AppBuilder BuildAvaloniaApp() + => AppBuilder.Configure(); +} \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo.Web/Properties/launchSettings.json b/demo/Semi.Avalonia.Demo.Web/Properties/launchSettings.json new file mode 100644 index 0000000..07152e3 --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Web/Properties/launchSettings.json @@ -0,0 +1,13 @@ +{ + "profiles": { + "Semi.Avalonia.Demo.Web": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/debug?browser={browserInspectUri}" + } + } +} \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj b/demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj new file mode 100644 index 0000000..755a3fa --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj @@ -0,0 +1,29 @@ + + + net7.0 + browser-wasm + AppBundle\main.js + Exe + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo/Semi.Avalonia.Demo.Web/runtimeconfig.template.json b/demo/Semi.Avalonia.Demo.Web/runtimeconfig.template.json new file mode 100644 index 0000000..c6990ba --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Web/runtimeconfig.template.json @@ -0,0 +1,11 @@ +{ + "wasmHostProperties": { + "perHostConfig": [ + { + "name": "browser", + "html-path": "index.html", + "Host": "browser" + } + ] + } +} \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo/Assets/avalonia-logo.ico b/demo/Semi.Avalonia.Demo/Assets/avalonia-logo.ico new file mode 100644 index 0000000..da8d49f Binary files /dev/null and b/demo/Semi.Avalonia.Demo/Assets/avalonia-logo.ico differ diff --git a/src/Semi.Avalonia.Demo/Pages/AutoCompleteBoxDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/AutoCompleteBoxDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/AutoCompleteBoxDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/AutoCompleteBoxDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/AutoCompleteBoxDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/AutoCompleteBoxDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/AutoCompleteBoxDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/AutoCompleteBoxDemo.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/BorderDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/BorderDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/BorderDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/BorderDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/BorderDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/BorderDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/BorderDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/BorderDemo.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/ButtonDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/ButtonDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/ButtonDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/ButtonDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/ButtonDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/ButtonDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/ButtonDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/ButtonDemo.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/CheckBoxDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/CheckBoxDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/CheckBoxDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/CheckBoxDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/CheckBoxDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/CheckBoxDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/CheckBoxDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/CheckBoxDemo.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/ExpanderDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/ExpanderDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/ExpanderDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/ExpanderDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/ExpanderDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/ExpanderDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/ExpanderDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/ExpanderDemo.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/FlyoutDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/FlyoutDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/FlyoutDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/FlyoutDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/FlyoutDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/FlyoutDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/FlyoutDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/FlyoutDemo.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/LabelDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/LabelDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/LabelDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/LabelDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/LabelDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/LabelDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/LabelDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/LabelDemo.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/ListBoxDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/ListBoxDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/ListBoxDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/ListBoxDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/ListBoxDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/ListBoxDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/ListBoxDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/ListBoxDemo.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml.cs similarity index 96% rename from src/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml.cs index 2ef6d7a..0b65d5e 100644 --- a/src/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml.cs +++ b/demo/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml.cs @@ -6,6 +6,7 @@ using Avalonia.Controls.Presenters; using Avalonia.Interactivity; using Avalonia.Markup.Xaml; using Avalonia.VisualTree; +using Semi.Avalonia.Demo.Views; namespace Semi.Avalonia.Demo.Pages; diff --git a/src/Semi.Avalonia.Demo/Pages/Overview.axaml b/demo/Semi.Avalonia.Demo/Pages/Overview.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/Overview.axaml rename to demo/Semi.Avalonia.Demo/Pages/Overview.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/Overview.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/Overview.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/Overview.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/Overview.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/ProgressBarDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/ProgressBarDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/ProgressBarDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/ProgressBarDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/ProgressBarDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/ProgressBarDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/ProgressBarDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/ProgressBarDemo.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/RadioButtonDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/RadioButtonDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/RadioButtonDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/RadioButtonDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/RadioButtonDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/RadioButtonDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/RadioButtonDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/RadioButtonDemo.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/RepeatButtonDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/RepeatButtonDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/RepeatButtonDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/RepeatButtonDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/RepeatButtonDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/RepeatButtonDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/RepeatButtonDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/RepeatButtonDemo.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/TabControlDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/TabControlDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/TabControlDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/TabControlDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/TabControlDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/TabControlDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/TabControlDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/TabControlDemo.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/TextBlockDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/TextBlockDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/TextBlockDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/TextBlockDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/TextBlockDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/TextBlockDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/TextBlockDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/TextBlockDemo.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/ToggleButtonDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/ToggleButtonDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/ToggleButtonDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/ToggleButtonDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/ToggleButtonDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/ToggleButtonDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/ToggleButtonDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/ToggleButtonDemo.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/ToggleSwitchDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/ToggleSwitchDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/ToggleSwitchDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/ToggleSwitchDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/ToggleSwitchDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/ToggleSwitchDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/ToggleSwitchDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/ToggleSwitchDemo.axaml.cs diff --git a/src/Semi.Avalonia.Demo/Pages/TreeViewDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/TreeViewDemo.axaml similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/TreeViewDemo.axaml rename to demo/Semi.Avalonia.Demo/Pages/TreeViewDemo.axaml diff --git a/src/Semi.Avalonia.Demo/Pages/TreeViewDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/TreeViewDemo.axaml.cs similarity index 100% rename from src/Semi.Avalonia.Demo/Pages/TreeViewDemo.axaml.cs rename to demo/Semi.Avalonia.Demo/Pages/TreeViewDemo.axaml.cs diff --git a/demo/Semi.Avalonia.Demo/Roots.xml b/demo/Semi.Avalonia.Demo/Roots.xml new file mode 100644 index 0000000..22c01ba --- /dev/null +++ b/demo/Semi.Avalonia.Demo/Roots.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/demo/Semi.Avalonia.Demo/Semi.Avalonia.Demo.csproj b/demo/Semi.Avalonia.Demo/Semi.Avalonia.Demo.csproj new file mode 100644 index 0000000..01aa6e7 --- /dev/null +++ b/demo/Semi.Avalonia.Demo/Semi.Avalonia.Demo.csproj @@ -0,0 +1,51 @@ + + + netstandard2.0 + enable + latest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Semi.Avalonia.Demo/MainWindow.axaml b/demo/Semi.Avalonia.Demo/Views/MainView.axaml similarity index 96% rename from src/Semi.Avalonia.Demo/MainWindow.axaml rename to demo/Semi.Avalonia.Demo/Views/MainView.axaml index a7b2a3f..d48b234 100644 --- a/src/Semi.Avalonia.Demo/MainWindow.axaml +++ b/demo/Semi.Avalonia.Demo/Views/MainView.axaml @@ -1,11 +1,10 @@ - @@ -74,4 +73,4 @@ - + diff --git a/demo/Semi.Avalonia.Demo/Views/MainView.axaml.cs b/demo/Semi.Avalonia.Demo/Views/MainView.axaml.cs new file mode 100644 index 0000000..5464c27 --- /dev/null +++ b/demo/Semi.Avalonia.Demo/Views/MainView.axaml.cs @@ -0,0 +1,11 @@ +using Avalonia.Controls; + +namespace Semi.Avalonia.Demo.Views; + +public partial class MainView : UserControl +{ + public MainView() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo/Views/MainWindow.axaml b/demo/Semi.Avalonia.Demo/Views/MainWindow.axaml new file mode 100644 index 0000000..dd78df4 --- /dev/null +++ b/demo/Semi.Avalonia.Demo/Views/MainWindow.axaml @@ -0,0 +1,14 @@ + + + diff --git a/demo/Semi.Avalonia.Demo/Views/MainWindow.axaml.cs b/demo/Semi.Avalonia.Demo/Views/MainWindow.axaml.cs new file mode 100644 index 0000000..4ff746b --- /dev/null +++ b/demo/Semi.Avalonia.Demo/Views/MainWindow.axaml.cs @@ -0,0 +1,23 @@ +using Avalonia.Controls; +using Avalonia.Controls.Notifications; + +namespace Semi.Avalonia.Demo.Views; + +public partial class MainWindow : Window +{ + private readonly WindowNotificationManager _manager; + public MainWindow() + { + InitializeComponent(); + _manager = new WindowNotificationManager(this) + { + Position = NotificationPosition.TopLeft, + MaxItems = 3 + }; + } + + internal void Notify(NotificationType t) + { + _manager.Show(new Notification(t.ToString(), "This is a notification message", t)); + } +} \ No newline at end of file diff --git a/demo/global.json b/demo/global.json new file mode 100644 index 0000000..d97078c --- /dev/null +++ b/demo/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "7.0.100" + } +} diff --git a/src/Semi.Avalonia.Demo/.gitignore b/src/Semi.Avalonia.Demo/.gitignore deleted file mode 100644 index 8afdcb6..0000000 --- a/src/Semi.Avalonia.Demo/.gitignore +++ /dev/null @@ -1,454 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# JetBrains Rider -.idea/ -*.sln.iml - -## -## Visual Studio Code -## -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json diff --git a/src/Semi.Avalonia.Demo/App.axaml.cs b/src/Semi.Avalonia.Demo/App.axaml.cs deleted file mode 100644 index 8afcd9a..0000000 --- a/src/Semi.Avalonia.Demo/App.axaml.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Avalonia; -using Avalonia.Controls.ApplicationLifetimes; -using Avalonia.Markup.Xaml; - -namespace Semi.Avalonia.Demo -{ - public partial 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(); - } - } -} \ No newline at end of file diff --git a/src/Semi.Avalonia.Demo/MainWindow.axaml.cs b/src/Semi.Avalonia.Demo/MainWindow.axaml.cs deleted file mode 100644 index 58008a0..0000000 --- a/src/Semi.Avalonia.Demo/MainWindow.axaml.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Diagnostics; -using Avalonia.Controls; -using Avalonia.Controls.Notifications; -using Avalonia.Controls.Primitives; -using Avalonia.Interactivity; -using Avalonia.Layout; -using Avalonia.VisualTree; - -namespace Semi.Avalonia.Demo -{ - public partial class MainWindow : Window - { - private readonly WindowNotificationManager _manager; - public MainWindow() - { - InitializeComponent(); - _manager = new WindowNotificationManager(this) - { - Position = NotificationPosition.TopLeft, - MaxItems = 3 - }; - } - - internal void Notify(NotificationType t) - { - _manager.Show(new Notification(t.ToString(), "This is a notification message", t)); - } - } -} \ No newline at end of file diff --git a/src/Semi.Avalonia.Demo/Program.cs b/src/Semi.Avalonia.Demo/Program.cs deleted file mode 100644 index f1878c7..0000000 --- a/src/Semi.Avalonia.Demo/Program.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Avalonia; -using System; -using Avalonia.Media; - -namespace Semi.Avalonia.Demo -{ - 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. - [STAThread] - public static void Main(string[] args) => BuildAvaloniaApp() - .With(new FontManagerOptions - { - FontFallbacks = new[] - { - new FontFallback - { - FontFamily = new FontFamily("Microsoft YaHei") - } - } - }) - .StartWithClassicDesktopLifetime(args); - - // Avalonia configuration, don't remove; also used by visual designer. - public static AppBuilder BuildAvaloniaApp() - => AppBuilder.Configure() - .UsePlatformDetect() - .With(new Win32PlatformOptions(){ UseCompositor = false}) - .LogToTrace(); - } -} \ No newline at end of file diff --git a/src/Semi.Avalonia.Demo/Semi.Avalonia.Demo.csproj b/src/Semi.Avalonia.Demo/Semi.Avalonia.Demo.csproj deleted file mode 100644 index 2b35c12..0000000 --- a/src/Semi.Avalonia.Demo/Semi.Avalonia.Demo.csproj +++ /dev/null @@ -1,31 +0,0 @@ - - - WinExe - net6.0 - enable - - copyused - true - - - - - - - - - - - - - - - - - - - - -