I'm trying to accomplish this: I need to hide my "Add own content" buttons when user enters Insert mode. To handle this, I subscribed ItemCommand event and check if CommandName is "InitInsert". If is, I set EventSource element visibility to false. That works great.
What's giving me hard time is EmptyDataTemplate. I placed my "Add own content" button in this template, but then after clicking it, layout changes, so of course setting visibility of this button to false have no meaning. I figured out, that I could handle LayoutCreated event and then find this button and hide it. There I encountered another problem: how to find out, whether I'm in Insert mode or not? InsertItem property of ListView is null, when I know that I entered insert mode. I looked through other properties and cannot seem to find out how to verify mode in which ListView is.
My question are:
1. How can I find out whether I'm in insert mode or not?
2. Is there any other way I can hide "add own content' button when in insert mode?
Thanks in advance,