none
Combobox loaded handler is called multiple times RRS feed

  • Question

  • We have a app with Avalon Docking Manager containing multiple document panes \ tabs.

    Everytime a tab is selected, the eventhandlers in the tab are called...

    EX: we have a  combobox in one of the tabs [Tab A] with a handler sired uo for the combobox loaded events.

    Everytime [Tab A] is selected at runtime, the combox loaded eventhandler is called....

    Shouldn't this event be called only the first time the tab page is created?


    Even though the existence of God cannot be determined through reason, a person should wager as though God exists, because living life accordingly has everything to gain, and nothing to lose - Pascal Blaise

    Wednesday, July 30, 2014 5:00 PM

Answers

  • Hi Elbino,

    Normally Loaded event only fires when the control rendered, but I'm not quite understand: we have a  combobox in one of the tabs [Tab A] with a handler sired uo for the combobox loaded events. Is that means your combobox container refreshes? If yes, then the combobox loaded event definitely fires again because it is rendering again.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Elbino Thursday, July 31, 2014 2:55 PM
    Thursday, July 31, 2014 6:50 AM
    Moderator

All replies

  • Hi Elbino,

    Normally Loaded event only fires when the control rendered, but I'm not quite understand: we have a  combobox in one of the tabs [Tab A] with a handler sired uo for the combobox loaded events. Is that means your combobox container refreshes? If yes, then the combobox loaded event definitely fires again because it is rendering again.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Elbino Thursday, July 31, 2014 2:55 PM
    Thursday, July 31, 2014 6:50 AM
    Moderator
  • Yes, the combobox loaded event is fired everytime the tab is selected. 

    Thanks...

    as you said, this is the intended behaviour in wpf, our old winforms apps didn't have this issue.


    Even though the existence of God cannot be determined through reason, a person should wager as though God exists, because living life accordingly has everything to gain, and nothing to lose - Pascal Blaise

    Thursday, July 31, 2014 2:55 PM