I am adding StackPanel items to XamCarouselPanel.ChildElements collection. I am creating these stack panels dynamically and they are of varying height. Everything is working great, but I can't find a way to center the items. I'm using a horizontal path and as the items cycle through, they seem to be vertically positioned at the bottom instead of the center.
I have based my layout on your Custom CarouselPanelNavigator Style example (ItemNavigatorStyling_Samp.xaml).
If you change the heights of some the images to 150 and some 50, you will notice when main focused item is shown, the bottom of the images always are at the same level vertically. I would like to have them centered instead.
Hi -
It looks like there is a ScrollViewer element in the default template of the CarouselPanelItem (the element that wraps each piece of content in the XamCarouselPanel) that is vertically aligned to the bottom. There is currently no way to programmatically control this alignment.
As a workaround,you could re-template the CarouselPanelItem and change the ScrollViewer's VerticalAlignment to Center. Since the template is a bit involved, the best approach to doing this would probably be to start with the copy of the default XAML for CarouselPanelItem (we provide the default XAML for all of our elements in the product installation) and change the ScrollViewer's VerticalAlignment to Center. I believe the default XAML is installed here:
C:\Program Files\Infragistics\NetAdvantage for WPF 2009 Volume 1\DefaultStyles\
(modify the version number to match the version you have installed).
If you would like to see a property added to control this behavior you can submit a feature request here: http://devcenter.infragistics.com/Protected/RequestFeature.aspx
Joe
This works fine... I requested the feature so hopefully this is just a property change rather that a couple hundred lines of xaml...
Thanks for your help.
How am I notified if my feature request is implemented?
I just upgraded to 2009 Vol2 and it does not seem to be in there or I'm not looking for the correct new property?
ThanksMike