Close

Move from XAML to Web-Tech

A project log for PowerShell Quick Tray

Get a notification-tray-located palette for running powershell commands

nicholas-jacksonNicholas Jackson 10/10/2022 at 04:174 Comments

Originally, I thought I was locked down to PowerShell's access to C# and XAML, but with WebView2, I can now use my knowledge of Web Dev, to get this moving faster, except... that WebView2 currently has no support for linux :(

But Photino does! For now, we will write the app using Photino, but backtrack to WebView2 progressively to keep this app MS-purist (keeps the code enterprise-friedly)

I had to make this move, because I could not find any good syntax highlighters for WPF. However, I know of plenty written for HTML.

In terms of performance, going to web tech seems like a down grade, but Edge Chromium is supposed to be extremely performant, and Photino claims to be more performant than Edge!

Hopefully, this will be a "profitable" move -if only I were making money doing this :(

Discussions

Nicholas Jackson wrote 10/10/2022 at 18:40 point

Well, it runs, but it runs on a loop, which means that limits automation... It seems like most of these C#-based web tech is designed on App loops, which makes it damn near impossible to automate with powershell

  Are you sure? yes | no

Nicholas Jackson wrote 10/10/2022 at 17:15 point

Well, it seemed to... I couldn't get anything to display, but I realized while I don't have write access to Program-Files, on my current machine I can run binaries instead. So, I downloaded the pwsh 7 binary to my project directory and started using that. Since, I don't get ISE with it, I also downloaded the VS Code binary to a neighboring directory, and it fully works!!! I can load up google!

  Are you sure? yes | no

Nicholas Jackson wrote 10/10/2022 at 05:51 point

But it seems to work!!!

  Are you sure? yes | no

Nicholas Jackson wrote 10/10/2022 at 05:42 point

...And it looks like we might have to move to WebView2 early, as my powershell doesn't seem to support net6.0 applications - I'm locked down to Win PS5.1 at the moment :(

  Are you sure? yes | no