You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You add a Slider control and two buttons to a window of the application. You write the following code fragment.
(Line numbers are included for reference only.)
01 <StackPanel Orientation=”Horizontal”>
02 <RepeatButton
03
04 Content=”Left”/>
05 <Slider Name=”slider”/>
06 <RepeatButton
07
08 Content=”Right”/>
09 </StackPanel>
You need to control the position of the slider thumb by clicking the buttons on the window.
What should you do?
A.
Insert the following code fragment at line 03.
Command=”Slider.DecreaseSmall” CommandTarget=”slider”
Insert the following code fragment at line 07.
Command=”Slider.IncreaseSmall” CommandTarget=”slider”
B.
Insert the following code fragment at line 03.
Command=”DecreaseSmall” CommandTarget=”{Binding ElementName=slider}”
Insert the following code fragment at line 07.
Command=”IncreaseSmall” CommandTarget=”{Binding ElementName=slider}”
C.
Insert the following code fragment at line 03.
Command=”Slider.DecreaseSmall” CommandTarget=”{Binding ElementName=slider}”
Insert the following code fragment at line 07.
Command=”Slider.IncreaseSmall” CommandTarget=”{Binding ElementName=slider}”
D.
Insert the following code fragment at line 03.
Command=”DecreaseSmall” CommandTarget=”slider”
Insert the following code fragment at line 07.
Command=”IncreaseSmall” CommandTarget=”slider”