Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/ironmansoftware/psavalonia

Avalonia bindings for PowerShell
https://github.com/ironmansoftware/psavalonia

avalonia powershell wpf

Last synced: 5 days ago
JSON representation

Avalonia bindings for PowerShell

Awesome Lists containing this project

README

        

# PSAvalonia

[Avalonia](http://avaloniaui.net/) bindings for PowerShell

## Avalonia

[Avalonia is a WPF-style, cross-platform UI library](http://avaloniaui.net/). It works with .NET Core and on Linux, Windows and MacOS.

## Available Commands

- Show-AvaloniaWindow
- ConvertTo-AvaloniaWindow
- Find-AvaloniaControl

## Example

```
$Xaml = '

My Button


'
$window = ConvertTo-AvaloniaWindow -Xaml $Xaml
$Button = Find-AvaloniaControl -Name 'button' -Window $Window
$txtDemo = Find-AvaloniaControl -Name 'txtDemo' -Window $Window
$Button.add_Click({$txtDemo.Text = "Hello, World from $($PSVersionTable.OS) running PowerShell Core $($PSVersionTable.PSVersion)"})
Show-AvaloniaWindow -Window $Window
```

_Script Running on Windows_

![](./images/windows-avalonia.gif)

_Script Running on Linux_

![](./images/linux-avalonia.gif)

## Supported PowerShell Versions

- 6.2
- 7.0