ElementFlow - Reflecting ElementHeight and ElementWidth changes

Dec 12, 2008 at 12:40 PM
Thanks for great project. I'm new to WPF and just started to investigate possibilities of Element Flow class, so my question is probably result of my lack of knowledge in this area (sorry for that). So, I'm using collection of ImageSource-s as source for element flow class. I would like that ElementHeight or ElementWidth properties (depending on orientation and style) are dynamically changed on resize of element flow control. I'm changing values of these properties, but I'm not able to make images (children) reflect these changes. How is best to acomplish this?
I have one more question, maybe addressing same or similar solution: How is possible to update image (child) dynamically when it is already shown? I maked this only with collection.Remove and Add, but this is not looking best.

Thanks.

Best regards,
Nenad.
Coordinator
Dec 12, 2008 at 3:09 PM
Hi Nenad,
       At the moment the Element[Width | Height] properties are read only at the load-time and not changed thereafter. If you would like to change the size of cards as the control is resized you could try experimenting with the PerspectiveCamera. Specifically you should be able to get the effect you want by bring the camera closer, resulting in a larger view of the cards. The amount of camera movement can be tied to the current size of the control.

Updating images dynamically:
This shoudl be possible by changing the Source on the Image in your DataTemplate at runtime. I assume there would be binding on the Source property of the image, which should automatically reflect on the UI, whenever there is a change. I am using a VisualBrush for the texture of the 3D cards, which automatically keeps track of changes happening to the DataTemplate.

Hope that helps!

Happy FluidKit -ing and welcome to the world of WPF !
Dec 12, 2008 at 4:06 PM
Thanks a Lot for your fast response and help, can't wait to try your suggestions.

Best regards,
Nenad.