Can anyone point me in the right direction for some documentation about handling WPF UI events in Powershell?
I want to know how to, for example, call a function when a CheckBox or Radio Button is changed.
Cheers!
Ben
Can anyone point me in the right direction for some documentation about handling WPF UI events in Powershell?
I want to know how to, for example, call a function when a CheckBox or Radio Button is changed.
Cheers!
Ben
Considering Wpf and PowerShell, have a look at WPF Linkcollection for PowerShell from Bernd. You will find many interesting links that will help you.
Considering your problem, just use pattern
$control.Add_<someevent>({ what to do })`
#example:
$control.Add_Click({ $global:clicked = $true })`
where someevent
is for example Click
for Button. You pass in a scriptblock that handles the event.