Table of Contents

Interface ISillActivatedByProcess

Namespace
WindowSill.API
Assembly
WindowSill.API.dll

Represents the declaration of a sill that will be activated when a specific app gets the focus in the operating system.

public interface ISillActivatedByProcess : ISill
Inherited Members
Extension Methods

Remarks

Use this interface to create a sill that reacts to process getting the focus. For example, you can create a sill that gets activated when a specific web browser is focused, or when a specific text editor is active, and provide functionalities that are relevant to that process.

<pre><code class="lang-csharp">[(typeof())]
[("My Sill")]
[()] // Optional. Default is .
[(Before = "OtherSill", After = "AnotherSill")] // Optional. Use to tied break ordering of sills when conflicting properties are set.
internal sealed class MySill: 
{
}</code></pre>

Properties

ProcessActivatorTypeNames

Gets a list of ISillProcessActivator activator names that determine when this sill will be activated based on which window gets the focus.

string[] ProcessActivatorTypeNames { get; }

Property Value

string[]

Remarks

You can define your own custom activator by implementing ISillProcessActivator.

Methods

OnActivatedAsync(string, WindowInfo)

Invoked when the sill is activated based on the current process window that has the focus in the operating system.

ValueTask OnActivatedAsync(string processActivatorTypeName, WindowInfo currentProcessWindow)

Parameters

processActivatorTypeName string

The name of the activator type that triggered the activation. This can be used to understand which process made this sill getting activated.

currentProcessWindow WindowInfo

Information about the current process window.

Returns

ValueTask

Remarks

This method is not awaited for completion.