RelativeRect Struct

Summary

Defines a rectangle that may be defined relative to a containing element.
Namespace
Avalonia
Interfaces
Base Types
  • object
  • ValueType
graph BT Type-->Base0["ValueType"] Base0-->Base1["object"] Type-.->Interface0["IEquatable<RelativeRect>"] Type["RelativeRect"] class Type type-node

Syntax

public readonly struct RelativeRect : ValueType, IEquatable<RelativeRect>

Constructors

Name Summary
RelativeRect(double, double, double, double, RelativeUnit) Initializes a new instance of the RelativeRect structure.
RelativeRect(Point, Point, RelativeUnit) Initializes a new instance of the RelativeRect structure.
RelativeRect(Point, Size, RelativeUnit) Initializes a new instance of the RelativeRect structure.
RelativeRect(Rect, RelativeUnit) Initializes a new instance of the RelativeRect structure.
RelativeRect(Size, RelativeUnit) Initializes a new instance of the RelativeRect structure.

Fields

Name Constant Value Summary
Fill
A rectangle that represents 100% of an area.
static

Properties

Name Value Summary
Rect Rect
Gets the rectangle.
Unit RelativeUnit
Gets the unit of the rectangle.

Methods

Name Value Summary
Equals(object) bool
Checks if the RelativeRect equals another object.
Equals(RelativeRect) bool
Checks if the RelativeRect equals another rectangle.
GetHashCode() int
Gets a hashcode for a RelativeRect.
Parse(string) RelativeRect
Parses a RelativeRect string.
static
ToPixels(Size) Rect
Converts a RelativeRect into pixels.

Operators

Name Value Summary
operator !=(RelativeRect, RelativeRect) bool
operator ==(RelativeRect, RelativeRect) bool