question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SelectedIndex did not changed after item removed

See original GitHub issue
<cards:CoverFlowView
    VerticalOptions="CenterAndExpand"
    HorizontalOptions="CenterAndExpand"
    IsPanSwipeEnabled="True"
    ItemsSource="{Binding Images}"
    SelectedIndex="{Binding CurrentIndex, Mode=TwoWay}"
    ItemSwiped="Handle_Swiped">
    <cards:CoverFlowView.ItemTemplate>
                    <DataTemplate>
                        <Image Aspect="AspectFit"
                               Source="{Binding .}" />
                    </DataTemplate>
      </cards:CoverFlowView.ItemTemplate>
</cards:CoverFlowView>

First, I use it to display images, and I find that after I remove one image from ItemsSource, selectedIndex did not changed. Second, SelectedIndex=“{Binding CurrentIndex, Mode=TwoWay}” Mode=TwoWay seems not worked.

version: 2.3.4.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
AndreiMisiukevichcommented, Oct 20, 2019

try 2.3.5

0reactions
Carl-Wencommented, Oct 21, 2019

try 2.3.5

@AndreiMisiukevich Thank you for the fix, it works fine now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to prevent SelectedIndexChanged event from firing in ...
Try removing the SelectedIndexChanged event before removing the item, then add it back in:
Read more >
ListBox.SelectedIndexChanged Event (System.Windows. ...
Occurs when the SelectedIndex property or the SelectedIndices collection has changed.
Read more >
ComboBoxEdit SelectedIndex on manual item removal issue
When a currently selected item is removed via code (Properties.Items.Remove(object o) method) the SelectedIndexChanged event won't fire, while ...
Read more >
HTMLSelectElement: selectedIndex property - Web APIs | MDN
The HTMLSelectElement.selectedIndex property is a long that reflects the index of the first or last selected element, depending on the value ...
Read more >
Picker selected index is always 0 on load! · Issue #16073
the property SelectedNamePrefix in the view model is only called once and never again. Once selected, any subsequent selections DO NOT CHANGE ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found