Description
The position of the slider can take on values from the defined range. The wMin
property returns the minimum value of this range. This value should be less than wMax
.
Declaration
TestObj.wMin
Read-Only Property | Double |
TestObj | A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section |
Applies To
The property is applied to the following object:
View Mode
To view this property in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.
Property Value
A float value specifying the minimum position of the slider.
Example
The example below obtains the wMin
and wMax
values and posts them to the log.
JavaScript, JScript
function Test()
{
// Select the mobile device
Mobile.SetCurrent("MyMobileDevice");
// Obtain the slider object
var p = Mobile.Device().Process("SampleApp");
var slider = p.XFObject("MainPage", "").XFObject("Grid", "").XFObject("Slider", "");
// Get the slider's minimum and maximum positions
var minPosition = slider.wMin;
var maxPosition = slider.wMax;
// Post the minimun and maximum positions to the log
Log.Message(minPosition);
Log.Message(maxPosition);
}
Python
def Test():
# Select the mobile device
Mobile.SetCurrent("MyMobileDevice")
# Obtain the slider object
p = Mobile.Device().Process("SampleApp")
slider = p.XFObject("MainPage", "").XFObject("Grid", "").XFObject("Slider", "")
# Get the slider's minimum and maximum positions
minPosition = slider.wMin
maxPosition = slider.wMax
# Post the minimun and maximum positions to the log
Log.Message(minPosition)
Log.Message(maxPosition)
VBScript
Sub Test
' Select the mobile device
Mobile.SetCurrent("MyMobileDevice")
' Obtain the slider object
Set p = Mobile.Device.Process("SampleApp")
Set slider = p.XFObject("MainPage", "").XFObject("Grid", "").XFObject("Slider", "")
' Get the slider's minimum and maximum positions
minPosition = slider.wMin
maxPosition = slider.wMax
' Post the minimun and maximum positions to the log
Log.Message minPosition
Log.Message maxPosition
End Sub
DelphiScript
procedure Test();
var p, slider, minPosition, maxPosition;
begin
// Select the mobile device
Mobile.SetCurrent('MyMobileDevice');
// Obtain the slider's object
p := Mobile.Device.Process('SampleApp');
slider := p.XFObject('MainPage', '').XFObject('Grid', '').XFObject('Slider', '');
// Get the slider's minimum and maximum positions
minPosition := slider.wMin;
maxPosition := slider.wMax;
// Post the minimun and maximum positions to the log
Log.Message(minPosition);
Log.Message(maxPosition);
end;
C++Script, C#Script
function Test()
{
// Select the mobile device
Mobile["SetCurrent"]("MyMobileDevice");
// Obtain the slider object
var p = Mobile["Device"]["Process"]("SampleApp");
var slider = p["XFObject"]("MainPage", "")["XFObject"]("Grid", "")["XFObject"]("Slider", "");
// Get the slider's minimum and maximum positions
var minPosition = slider["wMin"];
var maxPosition = slider["wMax"];
// Post the minimun and maximum positions to the log
Log["Message"](minPosition);
Log["Message"](maxPosition);
}
See Also
wMax Property (Specific to Xamarin.Forms Slider Controls)
Xamarin.Forms Slider Support
Testing Xamarin.Forms Applications (Legacy)