in the EditHeaderElement (x:Name=EditHeaderElement).
Could you please try adding these two lines and see if the problem still persist ? If yes, can you try giving more details regarding your scenario ?
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Thank you for helping me out, yes adding these two lines solved some of my problem, but I still have some problem left with me.
I am using contextMenu on these treeViewItems which is using the same "SelectionStyle" and it stopped working when I used the ItemTemplateSelector. I thought it is not working because of some issue in "SelectionStyle" which you told me. But even after resolving that part which you suggested still contextMenu is not working for treeViewItems. ContextMenu was working fine before using the ItemTemplateSelector.