Unplanned
Last Updated: 16 Aug 2018 13:26 by ADMIN
When adjust the carousel's PathFraction parameter,look the attach's image file,In the demo,click the left or right's image by mouse,the image can't move the new largest position,but don't adjust the pathfraction parameter,the default's value is 0.5,click the left or right's image .the image can move the current position(we feel the largest position is the current selected item position).

Edit: To work this around you can disable the default logic executed on click in the carousel and implement the moving with custom code. You can do that in the PreviewMouseLefButtonDown event of the  RadCarouselPanel control. Here is an example in code:

private void carouselPanel_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
	e.Handled = true;

	var position = e.GetPosition(this.carouselPanel);
	var hitTestResult = VisualTreeHelper.HitTest(this.carouselPanel, position);
	var image = hitTestResult.VisualHit as Image;
	if (image != null)
	{
		var newTopIndex = this.carouselPanel.Children.IndexOf(image);
		var currentTopIndex = this.carouselPanel.Children.IndexOf(this.carouselPanel.TopContainer);
		var displacement = newTopIndex - currentTopIndex;
		this.carouselPanel.MoveBy(displacement);
	}
}
Completed
Last Updated: 06 Jul 2017 12:56 by ADMIN
Available in LIB version: 2017.2.710
Unplanned
Last Updated: 08 Dec 2016 16:37 by ADMIN