Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ironmansoftware/psavalonia
Avalonia bindings for PowerShell
https://github.com/ironmansoftware/psavalonia
avalonia powershell wpf
Last synced: about 2 months ago
JSON representation
Avalonia bindings for PowerShell
- Host: GitHub
- URL: https://github.com/ironmansoftware/psavalonia
- Owner: ironmansoftware
- License: mit
- Created: 2019-06-17T22:14:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-15T05:30:34.000Z (almost 2 years ago)
- Last Synced: 2024-08-02T17:37:04.233Z (5 months ago)
- Topics: avalonia, powershell, wpf
- Language: PowerShell
- Homepage: https://ironmansoftware.com
- Size: 7.26 MB
- Stars: 57
- Watchers: 7
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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