RelativePosition Class

Represents a position on the designer that remains independent of coordinate systems.

Inheritance Hierarchy

System.Object
  Microsoft.Windows.Design.Interaction.RelativePosition

Namespace:  Microsoft.Windows.Design.Interaction
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Public NotInheritable Class RelativePosition _
    Implements IEnumerable
public sealed class RelativePosition : IEnumerable
public ref class RelativePosition sealed : IEnumerable
[<Sealed>]
type RelativePosition =  
    class
        interface IEnumerable
    end
public final class RelativePosition implements IEnumerable

The RelativePosition type exposes the following members.

Constructors

  Name Description
Public method RelativePosition(array<RelativePosition[]) Initializes a new instance of the RelativePosition class that contains zero or more existing reference positions.
Public method RelativePosition(String, array<RelativePosition[]) Initializes a new instance of the RelativePosition class that contains zero or more existing reference positions.

Top

Methods

  Name Description
Public method Contains Returns a value indicating whether the specified RelativePosition exists inside of this RelativePosition.
Public method Equals(Object) Determines whether the specified object is equal to this RelativePosition object. (Overrides Object.Equals(Object).)
Public method Equals(RelativePosition) Determines whether the specified RelativePosition is equal to this RelativePosition.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Returns the hash code for this object. (Overrides Object.GetHashCode().)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns the name of this position. (Overrides Object.ToString().)

Top

Operators

  Name Description
Public operatorStatic member Equality Compares two RelativePosition objects.
Public operatorStatic member Inequality Compares two RelativePosition objects.

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator For a description of this member, see IEnumerable.GetEnumerator.

Top

Remarks

You can create a single relative position, or a composite relative position that consists of more than one position. For example, if you define a relative position named "top" and another named "left", you can combine the two by calling new RelativePosition(top, left). Doing so creates a new relative position that is the composite of the first two. The framework defines a set of common relative positions in the static RelativePositions class. You may create your own relative positions for your own needs.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Windows.Design.Interaction Namespace

Other Resources

WPF Designer Extensibility