private void SlideView_SlidedToIndex(object sender, Telerik.XamarinForms.Primitives.SlideView.SlideViewSlidedToIndexEventArgs e) { if (e.Index == 0) { ApplyShadows(createSearchRef); } if (e.Index == 1) { ApplyShadows(createManualRef); } }
private void FeaturedSlideViewSlidedToIndex(object sender, Telerik.XamarinForms.Primitives.SlideView.SlideViewSlidedToIndexEventArgs e) { // This is a workaround for a bug in UWP where the ListView cannot measure it's Header accurately when the Header contains RadSlideView. if (Device.RuntimePlatform == Device.UWP) { Device.BeginInvokeOnMainThread(() => { var examplesListWidth = this.examplesList.Width; if (examplesListWidth >= 0) { var margin = (Thickness)this.Resources["UWPMargin"]; var headerMargin = (Thickness)this.Resources["UWPHeaderMargin"]; var totalHorizontalMargin = margin.HorizontalThickness + headerMargin.HorizontalThickness; var presenter = (RadSlideViewPresenter)sender; var headerWidth = presenter.WidthRequest + totalHorizontalMargin; if (examplesListWidth != headerWidth) { presenter.WidthRequest = examplesListWidth - totalHorizontalMargin; } } }); } }