One: The Silder control is a slider control, also exists in Silverlight, it is mainly used for volume control, brightness adjustment, color adjustment, thermometer and so on.
Main properties:
FlowDirection: Slide from left to right or from right to left
Minimum: Minimum value
Maximum: Max value
Orientation: Arrangement direction, vertical arrangement or horizontal arrangement
Tickfrequency: The value between each tick is allowed under the condition of slider length
Tickplacement: Scale display position, above or below slider or inside slider
Primary event: valuechanged: Triggering this event when a value changes
XAML and CS Code:
<textblock horizontalalignment= "left" margin= "471,127,0,0" name= "Tbtext" textwrapping= "Wrap" Text= ""
Verticalalignment= "Top" height= "width="/> <slider horizontalalignment= "left
" value= "ten" Name = "Slider1" flowdirection= "LeftToRight"
minimum= "0" maximum= "M" orientation= "Vertical"
tickfrequency= "5" Tickplacement= "BottomRight"
margin= "701,127,0,0" verticalalignment= "Top" height= "" width= ""/>
Public MainPage ()
{this
. InitializeComponent ();
This.slider1.ValueChanged + + slider1_valuechanged;
}
The new value of the void Slider1_valuechanged (object sender, Rangebasevaluechangedeventargs e)
{
this.tbText.Text = "Slider control : "+ e.newvalue +" old value: "+ E.oldvalue;
}
Two: The Toggleswitch control is a switch control, the WiFi switch in Windows 8 is also implemented using this control, and can also be used as volume switch.
Main properties:
Offcontent: Names that need to be operated when the state is closed, such as open, open, enable
Oncontent: Names that need to be manipulated when the state is turned on, such as closing, close, disabling
Header: The name displayed by the head of the control.
Primary event: toggled: Triggers the processing event when the state is switched.