How can I fix the rating slider GUI? To rate one, it needs to be dragged away and back again at the moment.

0 votes
67 views
asked May 9, 2016 by anonymous
I have a scale for rating responses that works with a mouse click. The slider is dragged and dropped on the number chosen.

This code (predefined in the header) " Rating=0; " specifies that the slider always appear at 1 after each stimuli.

However, when the participant needs to rate "1", clicking on 1 doesn't work, because the slider needs to be dragged to the location. So there is an awkward movement necessary, dragging slider to "2" and dragging it back to "1" again, in order to rate "1".

How can I fix this?

 

The XAML content is as:

 

<Slider Value='{Binding Rating}' Minimum='1' Maximum='10' Width='300'
   TickFrequency='1' Orientation='Horizontal' IsSnapToTickEnabled='False' TickPlacement='Both' VerticalAlignment='Center' HorizontalAlignment='Center'/>
   

 

Thanks in advance!

3 Answers

0 votes
answered May 12, 2016 by Ilia Korjoukov (8,200 points)
edited May 12, 2016 by Ilia Korjoukov
 
Best answer

There is another practical improvement that you can make recording responses by the slider. XAMl Slider has 'IsMoveToPointEnabled' property that would allow a participant choose a value by one click, rather than dragging the slider to it. Try this code with IsMoveToPointEnabled='True':

<Slider Value='{Binding Rating}' Minimum='0' Maximum='10' Width='300' TickFrequency='1' 
Orientation='Horizontal' IsSnapToTickEnabled='False' TickPlacement='Both'
VerticalAlignment='Center' HorizontalAlignment='Center' IsMoveToPointEnabled='True'/> 

Here is a very good tutorial on the XAML Slider element: http://www.wpf-tutorial.com/misc-controls/the-slider-control/

 

 

commented May 13, 2016 by durugun (110 points)
This helps a lot. But clicking on 1 still is a problem, it doesn't take the response at all. When I add 0 as a value and let the slider appear there, then I can get 1 as a value, which works well enough, but it is a bit of a cheat for now.

 

Thank you again!
0 votes
answered May 10, 2016 by Maria Molodova (8,320 points)
The slider value is updated only when the slider position is moved. In your case, I would suggest to change the slider minimum value to 0 and add the condition that only rating values above zero are accepted. Then, the participant will always need to move slider to rate, so the rating values will be updated.
+1 vote
answered May 16, 2016 by Ilia Korjoukov (8,200 points)
edited May 16, 2016 by Ilia Korjoukov

There is another alternative to the slider when you want to record a response score. You can use the XAML ListBox with a fixed list of items that represent all available scores. For example, the list box appearing as:

is generated by the following XAML code:

<ListBox SelectedIndex="{Binding ResponseIndex}">
	<ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <VirtualizingStackPanel Orientation="Horizontal"/>
                </ItemsPanelTemplate>
      </ListBox.ItemsPanel>
	  
	<ListBoxItem Content="1"/>
	<ListBoxItem Content="2"/>
	<ListBoxItem Content="3"/>
	<ListBoxItem Content="4"/>
	<ListBoxItem Content="5"/>
	<ListBoxItem Content="6"/>
	<ListBoxItem Content="7"/>
	<ListBoxItem Content="8"/>
	<ListBoxItem Content="9"/>
	<ListBoxItem Content="10"/>
</ListBox>

The item selection is bound to the 'ResponseIndex' integer variable (declared in the Header)  that you can directly record as response code. If you set the 'ResponseIndex' to -1 beforehand, no item will be selected, when the listbox appears. Participant's response (a mouse click on one of the items) can be detected, when 'ResponseIndex' changes from -1 to a positive value from 0 to 9. Just note the the fist item in the listbox has index 0, not 1.

Since a listbox response (selection) is made by a single click, it can be more natural routine than than dragging a slider.

Welcome to EventIDE Q&A forum where you can ask questions about EventIDE software and receive answers from other members of the community

FAQ questions

Installation and License


Coding


Eye-tracking


EEG Analysis


Visual Stimuli


Runtime and Data Collection


Hardware

...