I am having difficulty with how to add events to WPF XML in Powershell.
CheckStateChanged will say member not found and Checked says failed to create a 'Checked' from the text '...'
From what I can find most people find the control in Powershell using Findname and then do a Add_CheckStageChanged in Powershell with a scriptblock.
But the issue I am having is that when a Checkbox control is in a template I obviously can't find it.
So the work around is to do a findname on the datatemplate and then loadcontent of the datatemplate. Add an event to the checkbox pointing to a function. Then apply the template to my control.
But this seems like an ugly way of doing things. Is there an easier way to Add_<event> to a control within a template or groupstyle?
Any help would be appreciated.