Class NSLayoutAnchor<TAnchor>
- Namespace
- CarinaStudio.MacOS.AppKit
- Assembly
- CarinaStudio.AppBase.MacOS.dll
NSLayoutAnchor.
public class NSLayoutAnchor<TAnchor> : NSObject, IDisposable, IEquatable<NSObject> where TAnchor : NSLayoutAnchor<TAnchor>
Type Parameters
TAnchor
- Inheritance
-
NSLayoutAnchor<TAnchor>
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
NSLayoutAnchor(Class, IntPtr, bool)
Initialize new NSLayoutAnchor<TAnchor> instance.
protected NSLayoutAnchor(Class cls, IntPtr handle, bool ownsInstance)
Parameters
clsClassClass of instance.
handlenintHandle of instance.
ownsInstanceboolTrue to own the instance.
NSLayoutAnchor(IntPtr, bool, bool)
Initialize new NSLayoutAnchor<TAnchor> instance.
protected NSLayoutAnchor(IntPtr handle, bool verifyClass, bool ownsInstance)
Parameters
handlenintHandle of instance.
verifyClassboolTrue to verify whether instance is NSLayoutAnchor or not.
ownsInstanceboolTrue to own the instance.
Properties
Item
Get object which is used to calculate the anchor’s position.
public NSObject? Item { get; }
Property Value
Name
Get name of anchor.
public string Name { get; }
Property Value
Methods
ConstraintEqualTo(NSLayoutAnchor<TAnchor>)
Define constraint.
public NSLayoutConstraint ConstraintEqualTo(NSLayoutAnchor<TAnchor> another)
Parameters
anotherNSLayoutAnchor<TAnchor>
Returns
- NSLayoutConstraint
Constraint.
ConstraintEqualToWithConstant(NSLayoutAnchor<TAnchor>, float)
Define constraint.
public NSLayoutConstraint ConstraintEqualToWithConstant(NSLayoutAnchor<TAnchor> another, float offset)
Parameters
anotherNSLayoutAnchor<TAnchor>offsetfloat
Returns
- NSLayoutConstraint
Constraint.
ConstraintGreaterThanOrEqualTo(NSLayoutAnchor<TAnchor>)
Define constraint.
public NSLayoutConstraint ConstraintGreaterThanOrEqualTo(NSLayoutAnchor<TAnchor> another)
Parameters
anotherNSLayoutAnchor<TAnchor>
Returns
- NSLayoutConstraint
Constraint.
ConstraintGreaterThanOrEqualToWithConstant(NSLayoutAnchor<TAnchor>, float)
Define constraint.
public NSLayoutConstraint ConstraintGreaterThanOrEqualToWithConstant(NSLayoutAnchor<TAnchor> another, float offset)
Parameters
anotherNSLayoutAnchor<TAnchor>offsetfloat
Returns
- NSLayoutConstraint
Constraint.
ConstraintLessThanOrEqualTo(NSLayoutAnchor<TAnchor>)
Define constraint.
public NSLayoutConstraint ConstraintLessThanOrEqualTo(NSLayoutAnchor<TAnchor> another)
Parameters
anotherNSLayoutAnchor<TAnchor>
Returns
- NSLayoutConstraint
Constraint.
ConstraintLessThanOrEqualToWithConstant(NSLayoutAnchor<TAnchor>, float)
Define constraint.
public NSLayoutConstraint ConstraintLessThanOrEqualToWithConstant(NSLayoutAnchor<TAnchor> another, float offset)
Parameters
anotherNSLayoutAnchor<TAnchor>offsetfloat
Returns
- NSLayoutConstraint
Constraint.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.