Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vborovikov/only

Enables a WPF app to run as a single instance
https://github.com/vborovikov/only

desktop wpf wpf-application

Last synced: 3 days ago
JSON representation

Enables a WPF app to run as a single instance

Awesome Lists containing this project

README

        

# Only
This library enables a WPF app to run as a single instance.

[![Downloads](https://img.shields.io/nuget/dt/Only.svg)](https://www.nuget.org/packages/Only)
[![NuGet](https://img.shields.io/nuget/v/Only.svg)](https://www.nuget.org/packages/Only)
[![MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/vborovikov/only/blob/master/LICENSE)

# Usage

Get the `Only` package from NuGet and update your `App.xaml` file as follows:
```xml

...

```
Then modify `App.xaml.cs` to call `Only.InstanceAwareApp.RunSingle()` method:
```cs
public partial class App
{
public new int Run()
{
return RunSingle();
}
}
```

That's it!