locked
When ItemDisappearing event is fired RRS feed

  • Question

  • User350457 posted

    When ItemDisappearing event is fired

    Monday, October 23, 2017 7:15 AM

Answers

  • User171749 posted

    Xamarin.Forms.ListView.ItemDisappearing Event Occurs when the visual representation of an item is being removed from the visual layout.

    https://developer.xamarin.com/api/event/Xamarin.Forms.ListView.ItemDisappearing/

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, October 23, 2017 7:35 AM
  • User171749 posted

    If you have a list of 100 items, but you can only see 10 at a time because of the size of the cells once you scroll down and a new cell comes into view, and the top cell scrolls off the screen the ItemDisappearing event will fire.

    I've just tested it with the below: listView.ItemDisappearing += (sender, e) => { ShipmentItem itemGone = (ShipmentItem)e.Item; };

    So if I was to scroll down the ListView with 100 items in (which shows 10 at a time), I'd expect the ItemDisappearing event to fire 90 times.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, October 24, 2017 7:29 AM
  • User191123 posted

    @YuvarajChandrasekaran said: None of one people understand my question....??????????????? If I scroll down the ListView with 100 items. - which shows 10 at a time in Window or Screen. Then I scroll down ItemAppearing and DisAppearing Event cant fire. I want fire Each and Every time on ItemAppering and DisAppearing Event When ListView Items cant seen my Screen. (Scroll Down) Thats the Problem I ASk...Are You clear about my question.

    How about you post your code. As long as I can see the answer was already provided by @seanyda

    I've just tested it with the below:
    listView.ItemDisappearing += (sender, e) => {
    ShipmentItem itemGone = (ShipmentItem)e.Item;
    };
    

    So everytime an item "disappears" it should trigger. Same for appearing.

    Maybe you got something wrong in you code.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, October 24, 2017 9:09 AM

All replies

  • User191123 posted

    Short question, short answer

    Why do you ask. Do you have any problem here?

    Edit: Sorry if this post sound harsh. Didnt want to offense anyone. Just wanted to know if you have any problem with the event..

    Monday, October 23, 2017 7:35 AM
  • User171749 posted

    Xamarin.Forms.ListView.ItemDisappearing Event Occurs when the visual representation of an item is being removed from the visual layout.

    https://developer.xamarin.com/api/event/Xamarin.Forms.ListView.ItemDisappearing/

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, October 23, 2017 7:35 AM
  • User350457 posted

    Item Disappearing Event fires just navigate to other page. But it not fires scroll down. In visual layout only layout the maximum 10 or 12 ListViewItems. If my ListView have more than 100 items. Each scroll down condition that Disappearing event cant fires. Thats Y I ask it

    Monday, October 23, 2017 10:27 AM
  • User350457 posted

    If My ListView have 100 items. In display only 10 items then I scroll down the screen then I see others. That times previous ListView Items are not appear in Layout. And At a same time Disappearing events not fires. Then What Is the use of it. I want that When I scroll down the screen then disappearing event fire.Then What I do.?????????

    Monday, October 23, 2017 10:34 AM
  • User350457 posted

    Hi All, Reply me above questions.....I need urgent response

    Tuesday, October 24, 2017 5:11 AM
  • User171749 posted

    If you have a list of 100 items, but you can only see 10 at a time because of the size of the cells once you scroll down and a new cell comes into view, and the top cell scrolls off the screen the ItemDisappearing event will fire.

    I've just tested it with the below: listView.ItemDisappearing += (sender, e) => { ShipmentItem itemGone = (ShipmentItem)e.Item; };

    So if I was to scroll down the ListView with 100 items in (which shows 10 at a time), I'd expect the ItemDisappearing event to fire 90 times.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, October 24, 2017 7:29 AM
  • User350457 posted

    None of one people understand my question....??????????????? If I scroll down the ListView with 100 items. - which shows 10 at a time in Window or Screen. Then I scroll down ItemAppearing and DisAppearing Event cant fire. I want fire Each and Every time on ItemAppering and DisAppearing Event When ListView Items cant seen my Screen. (Scroll Down) Thats the Problem I ASk...Are You clear about my question.

    Tuesday, October 24, 2017 8:36 AM
  • User76049 posted

    Thats the Problem I ASk...Are You clear about my question.

    The question was answered, for one your question was very unclear, you don't specify what version of Forms, what OS (iOS, Android, UWP), what API level, what type of device etc etc.

    Have you tested with pre-release version of Forms?

    If the Xamarin listview doesn't meet your needs in it's default implementation you can investigate extending it with custom renderers or try a 3rd party control such as syncfusions sfLIstview etc.

    Tuesday, October 24, 2017 8:49 AM
  • User191123 posted

    @YuvarajChandrasekaran said: None of one people understand my question....??????????????? If I scroll down the ListView with 100 items. - which shows 10 at a time in Window or Screen. Then I scroll down ItemAppearing and DisAppearing Event cant fire. I want fire Each and Every time on ItemAppering and DisAppearing Event When ListView Items cant seen my Screen. (Scroll Down) Thats the Problem I ASk...Are You clear about my question.

    How about you post your code. As long as I can see the answer was already provided by @seanyda

    I've just tested it with the below:
    listView.ItemDisappearing += (sender, e) => {
    ShipmentItem itemGone = (ShipmentItem)e.Item;
    };
    

    So everytime an item "disappears" it should trigger. Same for appearing.

    Maybe you got something wrong in you code.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, October 24, 2017 9:09 AM