The instance stored in Items never changes (its collection contents do though), hence the binding does not get updated, bind to Items. Count and change the converter accordingly or use a Style with a DataTrigger which would be more appropriate than a converter.
Up vote 1 down vote favorite 1 share g+ share fb share tw.
I have a treeView and a stackpanel with message that "There is no items". So, I want to hide panel if treeView's items is not empty. Here is my XAML example: And here is my Converter's Convert method: public object Convert(object value, Type targetType, object parameter, System.Globalization.
CultureInfo culture) { return ((ItemCollection)value). Count == 0? Visibility.
Visible : Visibility. Collapsed; } I've used the Style property like this: but still same result. And in design mode everything works perfect!
But in fact panel always visible... What's the problem? Thank you! C# wpf xaml data-binding treeview link|improve this question edited Jan 15 at 22:43 asked Jan 15 at 22:28Artem Makarov27019 77% accept rate.
The instance stored in Items never changes (its collection contents do though), hence the binding does not get updated, bind to Items. Count and change the converter accordingly or use a Style with a DataTrigger which would be more appropriate than a converter. Something like this: (Default visibility needs to be set in a setter because of dependency property precedence).
Yes, I know all that, I'm just mixed default value! :) Thanks a lot! – Artem Makarov Jan 15 at 22:47.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.