Click or drag to resize
Ranorex

Location Class

Represents an abstract, relative location within an element or on the screen.
Inheritance Hierarchy
SystemObject
  RanorexLocation

Namespace:  Ranorex
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
[SerializableAttribute]
[TypeConverterAttribute(typeof(LocationLocationConverter))]
public class Location : IEquatable<Location>

The Location type exposes the following members.

Constructors
  NameDescription
Public methodLocation
Initializes a new instance of the Location class. This is equivalent to using 'Location.Center'.
Public methodLocation(Bitmap)
Initializes a new instance of the Location class specifying an image to search for.
Public methodLocation(Point)
Initializes a new instance of the Location class, using a pixel value.
Public methodLocation(PointF)
Initializes a new instance of the Location class, using a proportional position.
Public methodLocation(Double, Double)
Initializes a new instance of the Location class, using a proportional position.
Public methodLocation(Bitmap, ImagingFindOptions)
Initializes a new instance of the Location class specifying an image to search for using the specified options.
Public methodLocation(Bitmap, Location)
Initializes a new instance of the Location class specifying an image to search for and a relative location inside the found image.
Public methodLocation(Int32, Int32)
Initializes a new instance of the Location class, using a pixel value.
Public methodLocation(Bitmap, Location, ImagingFindOptions)
Initializes a new instance of the Location class using an image to search for and a relative location inside the found image.
Top
Properties
  NameDescription
Public propertyStatic memberCenter
Represents the center of an element.
Public propertyStatic memberCenterLeft
Represents the left center location of an element.
Public propertyStatic memberCenterRight
Represents the center right location of an element.
Public propertyFeature
Gets or sets an image that should be searched inside an element.
Public propertyFeatureOptions
Gets or sets the options for searching the Feature image.
Public propertyFixedLocation
Gets the relative pixel location if IsFixed is true. Throws an exception if the location is proportional.
Public propertyIsFixed
Gets a value indicating whether this instance is fixed, i.e. has a fixed pixel value.
Public propertyIsImageBased
Gets a value indicating whether this instance searches for a Feature image inside an element to get a relative offset inside the element.
Public propertyIsProportional
Gets a value indicating whether this instance is proportional, i.e. is proportional to the width and height of the element.
Public propertyStatic memberLowerCenter
Represents the lower center location of an element.
Public propertyStatic memberLowerLeft
Represents the lower left corner of an element.
Public propertyStatic memberLowerRight
Represents the lower right corner of an element.
Public propertyProportionalLocation
Gets the proportional location if IsFixed is false. Throws an exception if the location is fixed.
Public propertyStatic memberStandardValues
Gets an array of the standard locations.
Public propertyStatic memberUpperCenter
Represents the upper center location of an element.
Public propertyStatic memberUpperLeft
Represents the upper left corner of an element.
Public propertyStatic memberUpperRight
Represents the upper right corner of an element.
Top
Methods
  NameDescription
Public methodClone
Creates a new instance that is equal to this instance.
Public methodEquals(Object)
Determines whether the specified Object is equal to the current Location.
(Overrides ObjectEquals(Object).)
Public methodEquals(Location)
Indicates whether the current object is equal to another object of the same type.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetElementLocation
Gets the coordinates of a given Location corresponding to the specified element.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Overrides ObjectGetHashCode.)
Public methodGetLocationForRect
Gets the coordinates of a given Location corresponding to the specified rectangle.
Public methodGetScreenLocation
Gets the screen coordinates of a given Location corresponding to the specified element.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberCode exampleParse
Creates a new instance of the Location class from its string representation.
Public methodToString
Returns a String that represents the current Location.
(Overrides ObjectToString.)
Public methodStatic memberCode exampleTryParse
Tries to creates a new instance of the Location class from its string representation.
Top
Operators
Remarks
A location is a relative offset inside an element. It can either be specified by a fixed pixel value (x,y), a percentage of an element's height or width (e.g. Center, UpperRight), or an image that should be found inside the element.
See Also