none
Powershell GUI - Windows Forms vs WPF RRS feed

  • Question

  • Hi all,

    So i am working on a GUI for powershell and i am working with both Windows Forms and WPF to see the differences. One thing i came across that i couldn't fix in WPF is the autoclick function for a button. 

    In Windows forms we have the button function "PerformClick()", but in WPF this is not there. 

    Can you advise good way to perform button click via command? Some event handler or similar.

    Wednesday, May 15, 2019 12:58 PM

All replies

  • For assistance with programming WPF please post you issues in the developer forum.

    Here is the C# code for executing a button click:

     btn.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));


    \_(ツ)_/

    Wednesday, May 15, 2019 4:49 PM