日期:2014-05-20 浏览次数:21137 次
<ComboBox x:Name="cmbGroupList" Style="{DynamicResource ComboBoxStyle1}" ItemsSource="{Binding OutputGroupList}" SelectedValue ="{Binding MySelectedGroup, Mode=TwoWay}"> <i:Interaction.Triggers> <i:EventTrigger EventName="SelectionChanged"> <ei:CallMethodAction MethodName="UpdateOutputListBox" TargetObject="{Binding}"/> </i:EventTrigger> </i:Interaction.Triggers> </ComboBox>
private string m_selectedGroup; public string SelectedGroup { get { return this.m_selectedGroup; } set { this.m_selectedGroup = value; this.NotifyPropertyChanged("SelectedGroup"); } }
SelectedValue ="{Binding Path=SelectedGroup, Mode=TwoWay}">