fixes & testapp
This commit is contained in:
10
Pilz.UI.AvaloniaUI.TestApp/App.axaml
Normal file
10
Pilz.UI.AvaloniaUI.TestApp/App.axaml
Normal file
@@ -0,0 +1,10 @@
|
||||
<Application xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="Pilz.UI.AvaloniaUI.TestApp.App"
|
||||
RequestedThemeVariant="Default">
|
||||
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
|
||||
|
||||
<Application.Styles>
|
||||
<FluentTheme />
|
||||
</Application.Styles>
|
||||
</Application>
|
||||
23
Pilz.UI.AvaloniaUI.TestApp/App.axaml.cs
Normal file
23
Pilz.UI.AvaloniaUI.TestApp/App.axaml.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Pilz.UI.AvaloniaUI.TestApp;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
14
Pilz.UI.AvaloniaUI.TestApp/MainWindow.axaml
Normal file
14
Pilz.UI.AvaloniaUI.TestApp/MainWindow.axaml
Normal file
@@ -0,0 +1,14 @@
|
||||
<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"
|
||||
xmlns:my="https://git.pilzinsel64.de/pilz-framework/pilz"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Pilz.UI.AvaloniaUI.TestApp.MainWindow"
|
||||
Title="Pilz.UI.AvaloniaUI.TestApp">
|
||||
|
||||
<StackPanel>
|
||||
<my:ImageButton Text="Nice" Width="105"/>
|
||||
<my:ImageSplitButton Text="Nice" Width="105"/>
|
||||
</StackPanel>
|
||||
</Window>
|
||||
11
Pilz.UI.AvaloniaUI.TestApp/MainWindow.axaml.cs
Normal file
11
Pilz.UI.AvaloniaUI.TestApp/MainWindow.axaml.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Pilz.UI.AvaloniaUI.TestApp;
|
||||
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
26
Pilz.UI.AvaloniaUI.TestApp/Pilz.UI.AvaloniaUI.TestApp.csproj
Normal file
26
Pilz.UI.AvaloniaUI.TestApp/Pilz.UI.AvaloniaUI.TestApp.csproj
Normal file
@@ -0,0 +1,26 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="11.3.8"/>
|
||||
<PackageReference Include="Avalonia.Desktop" Version="11.3.8"/>
|
||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.8"/>
|
||||
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.3.8"/>
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<PackageReference Include="Avalonia.Diagnostics" Version="11.3.8">
|
||||
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
|
||||
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Pilz.UI.AvaloniaUI\Pilz.UI.AvaloniaUI.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
21
Pilz.UI.AvaloniaUI.TestApp/Program.cs
Normal file
21
Pilz.UI.AvaloniaUI.TestApp/Program.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Avalonia;
|
||||
using System;
|
||||
|
||||
namespace Pilz.UI.AvaloniaUI.TestApp;
|
||||
|
||||
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()
|
||||
.StartWithClassicDesktopLifetime(args);
|
||||
|
||||
// Avalonia configuration, don't remove; also used by visual designer.
|
||||
public static AppBuilder BuildAvaloniaApp()
|
||||
=> AppBuilder.Configure<App>()
|
||||
.UsePlatformDetect()
|
||||
.WithInterFont()
|
||||
.LogToTrace();
|
||||
}
|
||||
18
Pilz.UI.AvaloniaUI.TestApp/app.manifest
Normal file
18
Pilz.UI.AvaloniaUI.TestApp/app.manifest
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<!-- This manifest is used on Windows only.
|
||||
Don't remove it as it might cause problems with window transparency and embedded controls.
|
||||
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
|
||||
<assemblyIdentity version="1.0.0.0" name="Pilz.UI.AvaloniaUI.TestApp.Desktop"/>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- A list of the Windows versions that this application has been tested on
|
||||
and is designed to work with. Uncomment the appropriate elements
|
||||
and Windows will automatically select the most compatible environment. -->
|
||||
|
||||
<!-- Windows 10 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||
</application>
|
||||
</compatibility>
|
||||
</assembly>
|
||||
@@ -3,6 +3,8 @@
|
||||
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"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
x:Class="Pilz.UI.AvaloniaUI.Controls.ImageButton">
|
||||
|
||||
<StackPanel
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
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"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
x:Class="Pilz.UI.AvaloniaUI.Controls.ImageSplitButton">
|
||||
|
||||
<StackPanel
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>1.2.3</Version>
|
||||
<Version>1.2.5</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
10
Pilz.sln
10
Pilz.sln
@@ -55,6 +55,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pilz.UI.AvaloniaUI", "Pilz.
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pilz.UI.AvaloniaUI.Features", "Pilz.UI.AvaloniaUI.Features\Pilz.UI.AvaloniaUI.Features.csproj", "{E6607C0C-FD8D-422A-A612-B359F092FFAE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pilz.UI.AvaloniaUI.TestApp", "Pilz.UI.AvaloniaUI.TestApp\Pilz.UI.AvaloniaUI.TestApp.csproj", "{917553D2-2D26-431A-9DA6-ABDC6F3FCBF9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -271,6 +273,14 @@ Global
|
||||
{E6607C0C-FD8D-422A-A612-B359F092FFAE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E6607C0C-FD8D-422A-A612-B359F092FFAE}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{E6607C0C-FD8D-422A-A612-B359F092FFAE}.Release|x86.Build.0 = Release|Any CPU
|
||||
{917553D2-2D26-431A-9DA6-ABDC6F3FCBF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{917553D2-2D26-431A-9DA6-ABDC6F3FCBF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{917553D2-2D26-431A-9DA6-ABDC6F3FCBF9}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{917553D2-2D26-431A-9DA6-ABDC6F3FCBF9}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{917553D2-2D26-431A-9DA6-ABDC6F3FCBF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{917553D2-2D26-431A-9DA6-ABDC6F3FCBF9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{917553D2-2D26-431A-9DA6-ABDC6F3FCBF9}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{917553D2-2D26-431A-9DA6-ABDC6F3FCBF9}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
Reference in New Issue
Block a user