0

Basically i have two ListPicker controls in my Windows phone application. I bind the ListPicker1 using the collection List<A> ACollection.

"A" class will be having the another one collection List<B> BCollection.

I need the requirement is if BCollection.Count > 0 then i should enable the Visibility of ListPicker2 and should bind that BCollection[ Its from A class ] to the ListPicker2.

What i expect is , i need to achieve this everything in xaml with 0% c# code in Windows phone.. Is it possible in WP7?

David Bekham
  • 2,175
  • 3
  • 27
  • 56

1 Answers1

0

You need to expose BCollection.Count > 0 condition from your C# model as bool or Visiblity property. So no, it is not possible entirely in XAML w/o C#.

You can write dedicated converter in C# but it would be, well, C# code. See answer by AnthonyWJones for this question Is it possible to bind to a lambda expression in Silverlight?.

Community
  • 1
  • 1
Pol
  • 5,064
  • 4
  • 32
  • 51