I am trying to use the XamDateTimeRangeSlider in a similar way to the "Filtering ViewModel Data" example in the Samples application. I have the following XAML.
<ig:XamDateTimeRangeSlider x:Name="SliderDateRange" MinValue={Binding DateStart}" MaxValue={Binding DateEnd}" ThumValueChanged="SliderDateRange_ThumbValueChanged"> <ig:XamDateTimeRangeSlider.TickMarks> ......... </ig:XamDateTimeRangeSlider.TickMarks> <ig:XamDateTimeRangeSlider.Thumbs> <ig:XamSliderDateTimeThumb x:Name="dateTimeThumbStart" Value="{Binding DateStart}" /> <ig:XamSliderDateTimeThumb x:Name="dateTimeThumbEnd" Value="{Binding DateEnd}" /> </ig:XamDateTimeRangeSlider.Thumbs></igRibbon:XamDateTimeRangeSlider>
Here is the ThumValueChanged handler in the code-behind.private void SliderDateRange_ThumbValueChanged(object sender, ThumbValueChagnedEventArgs<DateTime> e){}
The dateTimeThumbStart works fine but dateTimeThumbEnd is always null. I know I do not need the Thumbs collection in the XAML but I tried it with and without without success. In the code-behind the this.SliderDateRange.Thumbs collection only ever has one item in the collection but I would think it would have two in this case.
I am trying to "bind" the XamDateTimeSlider to a XamDataChart, WPF DataGrid, and an XamPivotGrid. According to this example it just listens to the changing value of the thumbs in the code-behing and calls a Filter() method on the ViewModel. I do not see the ViewModel code in the example so my guess is that its altering the data-source for the other controls possibly using an ICollectionView. I was suprised there was no way to bind the XamDateTimeRangeSlider to the controls or possibly to the FlatDataSource.
Anyway...anyone know why I can not access the second thumb...why I only have 1 item in the Thumbs collection?
Thanks,
-eric
This was an error on my part, sorry for the post. You can delete this thread if you want. :-)
Hello Eric,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
Thank you for your post. I have been looking into it and I created a sample project for you following your scenario and everything seems to work ok on my side. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.
Looking forward for your reply.