Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit What is the AutoCompleteBox event for selection?
1 replies. Latest Post by mkadlec on November 4, 2009.
(0)
mkadlec
Member
2 points
8 Posts
11-04-2009 7:03 PM |
The AutoCompleteBox is working great for a staff picking textbox I have in my application. There is however, additional logic I would like to add once the user selects a staff member.
This is where I am stumped. I need an event that fires once the user scrolls down the selection and actually selects a staff member. I thought if I set the IsTextCompletion property to false and then used the Populated property that would do it, but unfortunately the Populated property fires ever time the user his the down arrow on the selection list.
I've included my XAML below, what event should I use? Is there one for this?
<input:AutoCompleteBox x:Name="uxAuto" Margin="20,1,2,1" FontSize="9" HorizontalAlignment="Left" Height="20" FilterMode="Custom" ToolTipService.ToolTip="Enter Staff Info" ValueMemberPath="DisplayValue" Populated="uxAuto_Populated" SelectionChanged="uxAuto_SelectionChanged" MinWidth="180"> <input:AutoCompleteBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Path=StaffId}" Margin="0,0,5,0" /> <TextBlock Text="{Binding Path=FullName}" /> </StackPanel> </DataTemplate> </input:AutoCompleteBox.ItemTemplate> </input:AutoCompleteBox>
11-04-2009 7:29 PM |
After playing around with it, I was able to use the DropDownClosed event, seems to fit the bill.
Not sure if that is the recommended solution but I'll use for now.