This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I am trying to use the dualSlider in a datatemplate, but the values that I bind to are not reflected on the slider when it shows up in the ui. The values shown are BeginRange = 0, and EndRange=maximum of the slider So, a couple of things that I've eliminated... I know that my underlying class is working properly, because the proper values show up in the TextBlocks that are bound in the same way. And just for fun, I decided to remove the binding and hard-code values for the StartRange and EndRange - and believe it or not, those values aren't taken either. I have tried using the dual slider outside a DataTemplate and I have no problems at all, everything works great. So I can only assume that there is something about the DataTemplate that is breaking the dualSlider. Any ideas would be greatly appreciated. I'm stumped <ListBox ItemsSource="{Binding GeoTypical}"> <ListBox.ItemTemplate> <DataTemplate> <Grid> <Grid.ColumnDefinitions>... </Grid.ColumnDefinitions> <ms:DualSlider Grid.Column="0" Height="30" HorizontalAlignment="Stretch" VerticalAlignment="Top" Minimum="-10" Maximum="20" SmallChange="1" SnapToTickMarks="True" ShowBottomRightTickMarks="False" ShowTopLeftTickMarks="False" RangeStart="{Binding Path=LowerValue}" RangeEnd="{Binding Path=UpperValue}" /> <!-- RangeStart="-10" RangeEnd="10"/> --> <TextBlock Grid.Column="1" Text="{Binding Path=LowerValue, StringFormat=LowerValue: {0}}" Margin="10,0" VerticalAlignment="Center" Foreground="Black"></TextBlock> <TextBlock Grid.Column="2" Text="{Binding Path=UpperValue, StringFormat=UpperValue: {0}}" VerticalAlignment="Center" Foreground="Black"></TextBlock> </Grid> </DataTemplate> </ListBox.ItemTemplate> </ListBox>
|
|
|
Hello Thanks for reporting this issue. We have modified the DualSlider to support being used in a DataTemplate. You can download this update through the nightly builds from tomorrow the 17th of September. Nightly builds can be found from this downloads page: http://www.mindscapehq.com/products/wpfelements/nightly-builds Regards |
|
|
Perfect. I downloaded the nightly build this morning - works great. Thanks for the super quick reply. |
|