UXListBox & SelectedItem highlighting/visual selection

1 reply. Last post: July 19, 2013 2:32 AM by Yudi
Tags :
  • New Discussion
  • New Question
  • New Product Feedback

UXListBox with ItemsSource & SelectedItem binding. The SelectedItem is populated and works flawlessly behind the scenes, but the visual highlighting/selection of it does not work when changing between items, ie I change the ActiveCriteria which has a different .CurrentlySelectedScore. 

Are there any known things that get in the way of the SelectedItem being highlighted that I can look for here or something I might just be overlooking? 

Notes:
-Silverlight 5
-Not overriding the visualstate in regards to the listbox at this time, can if that is related to fixing this
-I took the contents of the datatemplate and bound it to the same binding as SelectedItem outside of the listbox and everything shows properly, verifying that it is correctly populated and that it changes based on selection of a new selecteditem properly.
-The only case the visual selection highlight does not show is when changing ActiveCriteria. First pass through it is fine, first/next/prev/last from there is when this occurs.




UXListBox XAML Below

        <Intersoft:UXListBox x:Name="Scores"
                             HorizontalScrollBarVisibility="Disabled"
                             Intersoft:DockPanel.IsFillElement="True"
                             IsEnabled="{Binding ScoringOnlyModeCriteriaSection.AllowScoring}"
                             SelectionMode="Single"
                             ItemsSource="{Binding Section.ActiveCriteria.ScoringDefinitions}"
                             SelectedItem="{Binding Section.ActiveCriteria.CurrentlySelectedScore, Mode=TwoWay}">
            <Intersoft:UXListBox.ItemTemplate>
                <DataTemplate>
                    <Border BorderBrush="Black"
                            BorderThickness="1"
                            CornerRadius="3">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" MinWidth="75" />
                                <ColumnDefinition Width="Auto" MinWidth="75" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Item.Score}" />
                            <TextBlock Grid.Column="1" Text="{Binding Item.ShortDefinition}" />
                        </Grid>
                    </Border>
                </DataTemplate>
            </Intersoft:UXListBox.ItemTemplate>
        </Intersoft:UXListBox>

 

All times are GMT -5. The time now is 2:12 AM.
Previous Next