Skip to content

Fortelle/Poltergeist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Poltergeist

Nuget LICENSE

A .NET framework for desktop automation. demo

Getting Started

Step 1: Create a new project

Create a new WinUI 3 Application project in Visual Studio.

Step 2: Install Poltergeist

Install-Package Poltergeist
  • Or clone the repository to local.
git clone https://github.com/Fortelle/Poltergeist.git

Step 3: Override application

  • Open the App.xaml file, change
<Application
    x:Class="App1.App"
    xmlns="http:https://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http:https://schemas.microsoft.com/winfx/2006/xaml"
    >
</Application>

to

<poltergeist:PoltergeistApplication
    x:Class="App1.App"
    xmlns="http:https://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http:https://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();
    }
}

Step 4: Done

You can build and run the app now.