Answer the question
In order to leave comments, you need to log in
How to correctly bind the Visibility of a button to the presence of objects in ListView.SelectedItems?
I started with a simple Win Phone 7 Silverlight application. I did everything as it turned out - no BestPractise, a lot of code behind. Now I switched to Win Phone 8 Store Application - paired with the MVVM pattern. I try to use only binding and commands.
There is a simple case: we have a list of elements with the ability to select several of them; button on the AppBar to remove the selected items. It is necessary to organize a simple behavior: if there are no selected elements, hide the button. But an attempt to solve this problem by binding on the ListView.SelectedItems property was not successful - it is read-only and cannot be used for binding.
Hence the question: is there a 'classical' solution for this situation?
(Is it possible to break everything down with XAML alone?)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question