C
C#2y ago
Elio

✅ WPF Slider

Hello, I've bind my array of double to my slider but i do not know how to use the slider in order to select the value one by one. For example i have an array of 10 values so i want the slider to be a size of 10 tick and each tick display the value corresponding inside my array. If the array have a size of 15 the slider should have 15 tick, etc. How can i do that ?
4 Replies
goooosee
goooosee2y ago
Show the code Please
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Elio
ElioOP2y ago
<DockPanel HorizontalAlignment="Left" VerticalAlignment="Top" Margin="70,195,0,0"> <Slider x:Name ="ThicknessSlider" Width="120" HorizontalAlignment="Left" VerticalAlignment="Top" Value="{Binding Value}" TickFrequency="0.1" IsSnapToTickEnabled="True" DataContext="{Binding Thicknesses}"/> <TextBlock Text="{Binding Value}" DockPanel.Dock="Right" TextAlignment="Right" Width="40" Background="LightBlue"> <TextBlock.InputBindings> <MouseBinding CommandParameter="{Binding ThicknessValue}" Command="{Binding EditThicknessCommand}" MouseAction="LeftDoubleClick"/> </TextBlock.InputBindings> </TextBlock> </DockPanel> there my slider and Thicknesses is a list of double public List<double> Thicknesses = new List<double>();
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server