A .NET framework for desktop automation.
Create a new WinUI 3 Application project in Visual Studio.
- Install via NuGet.
Install-Package Poltergeist
- Or clone the repository to local.
git clone https://github.com/Fortelle/Poltergeist.git
- Open the
App.xaml
file, change
<Application
x:Class="App1.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
</Application>
to
<poltergeist:PoltergeistApplication
x:Class="App1.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:poltergeist="using:Poltergeist"
>
</poltergeist:PoltergeistApplication>
- Open the
app.xaml.cs
file, change
public partial class App : Application
{
public App()
{
this.InitializeComponent();
}
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
{
m_window = new MainWindow();
m_window.Activate();
}
private Window m_window;
}
to
public partial class App : PoltergeistApplication
{
public App()
{
this.InitializeComponent();
}
}
You can build and run the app now.