Powershell脚本的WPFComboBox值

时间:2016-01-29 16:54:27

标签: powershell

我正在尝试在PowerShell上运行Visual Studio,以便用户从下拉列表中选择应用程序,然后按添加按钮。我似乎无法弄清楚如何将选择绑定/映射到脚本将获得的值。这是我的清单:

<ComboBox x:Name="comboBox" HorizontalAlignment="Left" VerticalAlignment="Top" Width="120" Margin="270,330,0,0">
  <ComboBoxItem x:Name="Avaya_CMS" Content="Avaya CMS" HorizontalAlignment="Left" Width="118"/>
  <ComboBoxItem x:Name="Avaya_OneX" Content="Avaya One X" HorizontalAlignment="Left" Width="118"/>
  <ComboBoxItem x:Name="ControlM" Content="Control-M" HorizontalAlignment="Left" Width="118"/>
  <ComboBoxItem x:Name="IBM_DB2" Content="IBM DB2" HorizontalAlignment="Left" Width="118"/>
  <ComboBoxItem x:Name="Project_2010" Content="MS Project 2010" HorizontalAlignment="Left" Width="118"/>
  <ComboBoxItem x:Name="Visio_2010" Content="MS Visio 2010" HorizontalAlignment="Left" Width="118"/>
  <ComboBoxItem x:Name="SCCM" Content="SCCM Console" HorizontalAlignment="Left" Width="118"/>
</ComboBox>
<Button x:Name="Go" Content="Add" HorizontalAlignment="Left" Margin="413,330,0,0" VerticalAlignment="Top" Width="48"/>

我已经使用显示成员绑定输出到显示器,但这是我第一次进入ComboBox。

0 个答案:

没有答案