Is it possible to bind to a lambda expression in Silverlight?

前端 未结 2 1113
眼角桃花
眼角桃花 2021-01-22 15:21

I have a listbox that simply binds to a collection. The collection has a child collection (StepDatas). I would like to bind to a count of the child collection but with a WHERE

2条回答
  •  梦毁少年i
    2021-01-22 16:27

    Thanks for the response. After submitting the question, I wrote a converter class to do what you ended up suggesting but discovered that the count property will not cause a rebind when the data changes. This will force a situation where we will have to manually update the binding when changes are made. Getting a reference of the image object inside the listbox in order to update the target is unforntunately a pain in the arse!

    Ultimately, I just added a new field to the datasource and bound the image directly to it like you suggested. Much cleaner.

    Thanks for the suggestions! Doug

提交回复
热议问题