Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell WPF密码框获取值_Wpf_Powershell_Xaml_Passwordbox - Fatal编程技术网

Powershell WPF密码框获取值

Powershell WPF密码框获取值,wpf,powershell,xaml,passwordbox,Wpf,Powershell,Xaml,Passwordbox,我想我只是有个小问题。 我用WPF为Powershell创建了一个GUI,在这个GUI中有一个密码框,现在我想将这个密码框中的清除值放入PS中的一个变量中 <PasswordBox Name="PWBox" HorizontalAlignment="Left" Margin="147,75,0,0" VerticalAlignment="Top" Width="137" FontFamily="Century Gothic"/> 但是我在$password中没有任何值 正确的方法是

我想我只是有个小问题。 我用WPF为Powershell创建了一个GUI,在这个GUI中有一个密码框,现在我想将这个密码框中的清除值放入PS中的一个变量中

<PasswordBox Name="PWBox" HorizontalAlignment="Left" Margin="147,75,0,0" VerticalAlignment="Top" Width="137" FontFamily="Century Gothic"/>
但是我在$password中没有任何值

正确的方法是什么

提前感谢,,
Robin

显示了什么?
$PWBox | GM
嗨,Paxz,安静了很多东西:
TypeName:System.Windows.Controls.PasswordBox Name:SecurePassword成员类型:属性定义:securestring SecurePassword{get;}
$password = $PWBox.Password