Is State Behaviour the Right Tool to use?

Jul 9, 2013 at 11:27 PM
Hi

I am making an app and I have a Product class that contains many Stores(ObservableCollection)

in my stores class I have IsSale property that is a bool.

Now I use blend to drag in my observableCollection in my wp7 view and it made me a selectlist with all my properties.

My IsSale of course is now a check-box. I went to my list and went "Edit Additional Templates -> Edit Generated Items -> Edit Current".

I then deleted the checkbox and added a "Sale icon" into it. Now of course every item is not a sale item so I need to toggle(visibility) based on IsSale item.

I am not sure if I should use state behavior like done in the 1st video or if I should do something like what was done in the second video with changing the rectangle to green.

If I do the latter though I am not sure how to do it as in the video the "DateofBirth" was at the root level and not encapsulated in another collection.

So I not sure how to access it and do what was done in the 2nd video.

I tried doing state and it seems to work. I have 2 items one a sale item and one that is not and the icons show as expected however in blend they both sale icons are visiable so, I think that way kills blendablity?