TreeView ItemInvoked event is not fired/called when app is in Release Mode

Dennis Arriola 61 Reputation points
2021-06-14T07:19:36.887+00:00

We have a UWP application that uses TreeView control under Microsoft.UI.Xaml.Controls v 6.1.1, our issue which we just discovered during the actual testing of our app is that ItemInvoked event is not fired when the app is in Release Mode. Has anyone experienced this? Thanks
105312-image.png

Universal Windows Platform (UWP)
{count} vote

1 answer

Sort by: Most helpful
  1. Nico Zhu (Shanghai Wicresoft Co,.Ltd.) 12,866 Reputation points
    2021-06-15T08:55:10.893+00:00

    Hello, Welcome to Micorosoft Q&A,

    TreeView ItemInvoked event is not fired/called when app is in Release Mode

    During the testing, ItemInvoked could be triggered when TreeView item clicked. Please try to clean the solution and rebuild again.

    And as @Dennis Arriola comment said, could also use Tapped evet name to replace. it will work as expected

    <Interactivity:Interaction.Behaviors>  
        <Core:EventTriggerBehavior EventName="Tapped">  
            <Core:InvokeCommandAction Command="{Binding Command}" />  
        </Core:EventTriggerBehavior>  
    </Interactivity:Interaction.Behaviors>  
    

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.