CoreWindowsWrapper 1.0.3.3
See the version list below for details.
dotnet add package CoreWindowsWrapper --version 1.0.3.3
NuGet\Install-Package CoreWindowsWrapper -Version 1.0.3.3
<PackageReference Include="CoreWindowsWrapper" Version="1.0.3.3" />
paket add CoreWindowsWrapper --version 1.0.3.3
#r "nuget: CoreWindowsWrapper, 1.0.3.3"
// Install CoreWindowsWrapper as a Cake Addin #addin nuget:?package=CoreWindowsWrapper&version=1.0.3.3 // Install CoreWindowsWrapper as a Cake Tool #tool nuget:?package=CoreWindowsWrapper&version=1.0.3.3
CoreWindowsWrapper
Native Windows Wrapper for .NET-Core
CoreWindowsWrapper is a DLL you can use to create Core Applications showing Dialogs without using System.Windows.Forms. The Project uses the Windows - API to create Native Windows. I personally use this DLL to create Copy-Deploy-Setups.
This is a Visual Stuido 2019 Preview Project using NETCore 3.0-preiew. With NETCore 3.0 you can create Windows-Applications.
If You want to use this with NETCore 2.X you can Publish the native app. Go into the Publish-Folder and modify the EXE SUBSYSTEM. This changes the Comsole-Application to a Windows-Application:)
editbin.exe ConsleCaller.exe /SUBSYSTEM:WINDOWS
If you want to enable vusual Styles you can use MT.EXE
mt.exe -manifest app.manifest -outputresource:ConsoleCaller.exe;#1
Application with Styling enabled.
If the application contains the Manifest it looks like this.
Application with Styling disabled.
If you do not use MT.exe or do not include app.manifest in your Project. The application looks like this.
Create a Native Window
Create a new Class derive from NativeWindow
//Native Window
public class Window1:NativeWindow
{
//Add your Controls
//in this example a Button
private NativeButton _Button;
//Override InitControls Function
protected override void InitControls()
{
//Set the properties of the Form.
this.Text = "Dies ist meine Anwnedung";//Caption of the Window.
this.Name = "Window1";
this.Left = 100;
this.Top = 100;
this.Width = 600;
this.Height = 400;
//Create the Button
this._Button = new NativeButton
{
Left = 10,
Top = 10,
Width = 100,
Height = 30,
Text = "Test",//Caption of the Button
Name = "bnTest",
Font = new Font(){Name="Arial",Size=14} //set the Font of the Button
};
//Add Eventhandler
this._Button.Clicked += button_OnClicked;
//Add the Button to the Window.
this.Controls.Add(this._Button);
}
//Eventhandler for the Button
private void button_OnClicked(object sender, EventArgs e)
{
//Show a Messagebox.
MessageBox.Show("Button Clicked!");
}
}
For more Details have a look at the Project ConsoleCaller.
Initialize the Application
To initilize the Application you have to create 2 Lines of Code in the Main-Function. This is necessary because of Threading and Windows Messaging.
using CoreWindowsWrapper;
namespace ConsleCaller
{
class Program
{
static void Main(string[] args)
{
//Create the Window
Window1 nw = new Window1();
//Run the Application
NativeApp.Run(nw);
}
}
}
I hope this helps in many Projects.
Dipl.-Ing.(FH) Guido Agnesmeyer
January 2019
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 is compatible. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 2.2
-
.NETStandard 2.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on CoreWindowsWrapper:
Package | Downloads |
---|---|
Diga.NativeControls.WebBrowser
Diga.NativeControls.WebBrowser.Core |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.8.20 | 85 | 10/24/2024 |
2.0.8.20-prerelease | 105 | 4/25/2024 |
2.0.8.18-prerelease | 104 | 4/10/2024 |
2.0.8.15-prerelease | 156 | 3/14/2024 |
2.0.8.1-prerelease | 105 | 2/23/2024 |
2.0.8-prerelease | 111 | 2/22/2024 |
2.0.7 | 1,312 | 2/20/2024 |
2.0.6 | 113 | 2/20/2024 |
2.0.5 | 107 | 2/19/2024 |
2.0.4 | 2,095 | 10/4/2023 |
2.0.3 | 1,202 | 2/25/2022 |
2.0.2 | 3,890 | 12/6/2021 |
2.0.1-preview | 552 | 10/21/2021 |
1.0.47 | 909 | 3/4/2021 |
1.0.46 | 1,262 | 8/7/2020 |
1.0.45 | 629 | 7/13/2020 |
1.0.44 | 631 | 7/2/2020 |
1.0.43 | 473 | 6/19/2020 |
1.0.42 | 475 | 6/18/2020 |
1.0.41 | 603 | 6/16/2020 |
1.0.3.3 | 488 | 1/29/2020 |
1.0.3.1 | 595 | 6/14/2019 |
1.0.2.2 | 414 | 2/20/2019 |
1.0.2.1 | 381 | 2/13/2019 |
1.0.2 | 879 | 2/10/2019 |
1.0.0 | 670 | 1/26/2019 |
First implementation.