Runtime exception "Type not found" in Slider.ValueChanged handler

I’m facing some issue with ValueChanged event handler of a slider control element in my WPF script, generated in Visual Studio Community 2017 with PowerShell Pro Tools with a trial license. Here is my simple xaml



and my xaml.ps1 file

function Add-ControlVariables {

New-Variable -Name ‘sldr_hTime’ -Value $window.FindName(‘sldr_hTime’) -Scope 1 -Force

[System.Reflection.Assembly]::LoadWithPartialName(“PresentationFramework”) | Out-Null

function Import-Xaml {
[xml]$xaml = Get-Content -Path $PSScriptRoot\WpfWindow1.xaml
$manager = New-Object System.Xml.XmlNamespaceManager -ArgumentList $xaml.NameTable
$manager.AddNamespace(“x”, “”);
$xaml.SelectNodes("//*[@x:Name=‘sldr_hTime’]", $manager)[0].RemoveAttribute(‘ValueChanged’)
$xamlReader = New-Object System.Xml.XmlNodeReader $xaml

function Set-EventHandler {

	Set_txbx_hTime -sender $sender -e $e


$window = Import-Xaml

function Set_txbx_hTime
param($sender, $e)


No single line of manually typed code-behind. Absolutely everything is automatically generated by the PoSh Tools Extention. But when I run my application, while trying to moove the slider’s thumb (changing the value property) I get a runtime exception
[ERROR] Exception calling “ShowDialog” с “0” arguments: “Type not found [Sy
[ERROR] stem.Double`ValueType].” =(((((

The only place this could be found in .ps1 is “param([System.Object]$sender,[System.Windows.RoutedPropertyChangedEventArgs1[System.DoubleValueType]]$e)” but am not aware of this construct. As far as I know, System.Windows.RoutedPropertyChangedEventArgs and System.Double are the .Net Framework classes and the ValueType is as well. But what does the whole construct “[System.Windows.RoutedPropertyChangedEventArgs1[System.DoubleValueType]]” means?
How can I handle the ValueChanged event of my slider? As far as I get, without handling this event the whole Control Element is useless if I can’t get what value a user have chosen.
What am I missing? Or its better to say WTF with WPF?))))

Sorry me – am an nube, so ma xaml is not visible in the post, but no matter! It’s a quite silly sumption for me, but seems it’s just a misstyping or some undeleted developement trash or smthng…
I’ve just deleted the “1" and "ValueType” in “$sldr_hTime.add_ValueChanged({
Set_txtbx_xTime -sender $sender -e $e
to make it like “$sldr_hTime.add_ValueChanged({
Set_txtbx_xTime -sender $sender -e $e
and everything began to run propally…
Honestly, I’m confused… Do not exclude that this is WRONG!!! and further… in future I’ll face some issues because of this, but untill someone explaines me WTF (Imean “what means [System…[SomeClass`…]”) I’m just not able to realize what I’ve done and whats going on… But never the less

Let me take a look at the slider control. The code is definitely not being generated correctly.

I opened an issue here: WPF Designer Slider Control OnChange Does Not Work · Issue #649 · ironmansoftware/issues · GitHub