C# 为WPF组合框链接TextChanged和SelectionChanged
在这种情况下,我希望在修改输入到可编辑组合框中的文本并调用TextChanged处理程序时使其处于选中状态。原因是一些非常重要的工作是在组合框的SelectionChanged处理程序中完成的 组合框在代码隐藏中定义如下:C# 为WPF组合框链接TextChanged和SelectionChanged,c#,wpf,combobox,C#,Wpf,Combobox,在这种情况下,我希望在修改输入到可编辑组合框中的文本并调用TextChanged处理程序时使其处于选中状态。原因是一些非常重要的工作是在组合框的SelectionChanged处理程序中完成的 组合框在代码隐藏中定义如下: <ListView.View> <GridView x:Name="callListView" AllowsColumnReorder="True" ColumnHeaderToolTip="Broadcast call target
<ListView.View>
<GridView x:Name="callListView" AllowsColumnReorder="True" ColumnHeaderToolTip="Broadcast call targets" >
<GridViewColumn Width="120">
<GridViewColumn.CellTemplate>
<DataTemplate>
<ComboBox ItemsSource="{Binding Path=extensions, RelativeSource={RelativeSource AncestorType=Window}}"
Width="105" IsEditable="True" HorizontalAlignment="Center" Margin="0,0,0,0" BorderThickness="0"
SelectedItem="{Binding Path=Key, Mode=OneWay}" SelectionChanged="chooseExtension_SelectionChanged"
TextBoxBase.TextChanged="chooseExtension_TextChanged" IsTextSearchEnabled="False">
<ComboBox.Resources>
<sys:Double x:Key="{x:Static SystemParameters.VerticalScrollBarWidthKey}">15</sys:Double>
</ComboBox.Resources>
</ComboBox>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
<!-- a bunch of unrelated stuff was removed to keep this simple -->
</ListView.View>
15
有没有办法使文本更改后的当前文本成为组合框的SelectedValue