I have not been able to change the item size of the xamCarouselListBox item to fit the content in my datatemplate. I get scroll bars instead that look terrible, if I apply a style to the xamCarouselListBoxItem I can remove the scroll bars but nothing seems to work when changing the width and height of the item.
I have attached how I dynamically create the control and apply template and the simple style I have used to try and change the item size.
I basically cannot use the control at the moment until this is resolved.
Hi,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this answer as well.
Thanks again.
This issue has been resolved. I think it would have been hard to set various effects of the control in code. I defined the control and bindings in generic.xaml file as a data template. In the shell of my project I create a content control dynamically and assign the data template that has the xamDataCarouselListBox control in it.
---- UPDATE ---
The problem is that the view settings when set dynamically the way I have done do not work.
Can someone please show me how it can be done in code.
This is what I am doing....
CurrentPatientView.ViewSettings.ItemSize = new System.Windows.Size(270, 170);
CurrentPatientView.ViewSettings.IsListContinuous = true;
CurrentPatientView.ViewSettings.ItemPathAutoPad = false;
CurrentPatientView.ViewSettings.ItemPathHorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
CurrentPatientView.ViewSettings.ItemPathVerticalAlignment = System.Windows.VerticalAlignment.Stretch;
CurrentPatientView.ViewSettings.ItemPathPadding = new Thickness(200, 0, 200, 200);
CurrentPatientView.ViewSettings.ReserveSpaceForReflections = false;
CurrentPatientView.ViewSettings.AutoScaleItemContentsToFit = false;
CurrentPatientView.ViewSettings.UseScaling = true;