This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I have an Class that has an ObservableCollection<Group> Groups property. The Group class has a BindingList of Steps. I am trying to get the CoverFlow Items to be binded to the list of Steps that is inside the Group list. When I set the ItemSource of the CoverFlow to Steps the Items are empty. But when I set it to Groups I see one Item per Group. Any suggestions what I might be doing wrong?
-Also is it possible to give the CoverFlow Item a Text Header that would display outside the image on top? Thanks |
|
|
Hello Could you please send us a small sample that shows what you are doing so far? Cheers |
|
|
Here is a sample of what I am doing.
|
|
|
And this is a picture of what I am trying to get.
Thanks |
|
|
Hello Thanks for the sample and image, they helped a lot. The items added to the coverflow all need to be in a single list. Your data model is a bit more complicated than a single list but there a few things you can do to get the desired results. One thing you could try is change your data model to only contain a single list of steps where each step knows which group it belongs to. If you really need the groups -> steps structure, then you can keep the list of groups which contain a list of steps, but include an additional list which contains all the steps. In this case, you would also need to modify the Step class so that a step had a reference to the group that they belong to, or at least a reference to the group name, as well as a boolean to indicate if the group name should be visible. I have attached a modified version of the sample you sent us which produced the desired result displayed in your image. The approach that I used here is yet another thing you could do, this time which doesn't require any modifications to your original data model. The main thing I included is an IValueConverter which takes the list of Group objects and returns a list that the cover flow control can handle. This new list that the value converter returns is made up of CoverFlowItemModel objects. This custom object contains the Step that it represents, the Group that the step belongs to (for displaying the group name) and a boolean to indicate if the group name should be displayed. The bindings used in the item template were then updated to point to the appropriate properties of the CoverFlowItemModel class. To modify your sample, I used a reference to my own copy of the WpfElements dll, so You will need to reference your copy again in order to run the sample. Let me know how it goes. |
|
|
I went with the example you gave me since I did not want to have to change my existing structure, thanks for all the suggestions. Thank you! -Jessica |
|