I have an AutoCompleteBox on a view that is displayed in a prism region. Its SearchText property is bound to a property "NewAction" in my View Model, in good MVVM fashion.
When this view loads in the region the first time, it behaves correctly. When I activate another view in the region, then re-activate it, the control no longer behaves correctly. Any text entered does not trigger the SearchTextChanged event, nor does the value make it to the "NewAction" property.
<telerik:RadAutoCompleteBox Grid.Row="1" Grid.Column="3" Margin="3" x:Name="auto_NewActionDesciption" SelectionMode="Single" TextSearchMode="Contains" AutoCompleteMode="Suggest"
SearchText="{Binding NewAction, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" WatermarkContent="< New Action >"
ItemsSource="{Binding ActionDescriptions.View}" SearchTextChanged="RadAutoCompleteBox_SearchTextChanged"/>
I thought maybe the binding was getting removed somehow, so when the view loads I checked the BindingExpression for the SearchTextProperty. It is still there and correct.
System.Windows.Data.BindingExpression B =auto_NewActionDesciption.GetBindingExpression(Telerik.Windows.Controls.RadAutoCompleteBox.SearchTextProperty);
I also tried adding another SearchTextChanged event handler to the control when the view loads, but the event still doesn't get thrown when I input some text into the control.
Can anyone shed any light on what might be happening here?
When this view loads in the region the first time, it behaves correctly. When I activate another view in the region, then re-activate it, the control no longer behaves correctly. Any text entered does not trigger the SearchTextChanged event, nor does the value make it to the "NewAction" property.
<telerik:RadAutoCompleteBox Grid.Row="1" Grid.Column="3" Margin="3" x:Name="auto_NewActionDesciption" SelectionMode="Single" TextSearchMode="Contains" AutoCompleteMode="Suggest"
SearchText="{Binding NewAction, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" WatermarkContent="< New Action >"
ItemsSource="{Binding ActionDescriptions.View}" SearchTextChanged="RadAutoCompleteBox_SearchTextChanged"/>
I thought maybe the binding was getting removed somehow, so when the view loads I checked the BindingExpression for the SearchTextProperty. It is still there and correct.
System.Windows.Data.BindingExpression B =auto_NewActionDesciption.GetBindingExpression(Telerik.Windows.Controls.RadAutoCompleteBox.SearchTextProperty);
I also tried adding another SearchTextChanged event handler to the control when the view loads, but the event still doesn't get thrown when I input some text into the control.
Can anyone shed any light on what might be happening here?