Skip to content

Class RectangleConverter

Definition

Namespace: StardewUI.Framework.Converters
Assembly: StardewUI.dll

String converter for the XNA Rectangle type.

public class RectangleConverter : 
    StardewUI.Framework.Converters.IValueConverter<string, Microsoft.Xna.Framework.Rectangle>, 
    StardewUI.Framework.Converters.IValueConverter

Inheritance
Object ⇦ RectangleConverter

Implements
IValueConverter<string, Rectangle>, IValueConverter

Members

Constructors

Name Description
RectangleConverter()

Methods

Name Description
Convert(string) Converts a value from the source type to the destination type.
Parse(string) Parses a Rectangle value from its comma-separated string representation.

Details

Constructors

RectangleConverter()

public RectangleConverter();

Methods

Convert(string)

Converts a value from the source type to the destination type.

public Microsoft.Xna.Framework.Rectangle Convert(string value);
Parameters

value   string
The value to convert.

Returns

Rectangle


Parse(string)

Parses a Rectangle value from its comma-separated string representation.

public static Microsoft.Xna.Framework.Rectangle Parse(string value);
Parameters

value   string
String representation of a Rectangle, having 4 comma-separated integer values.

Returns

Rectangle

The parsed Rectangle.

Remarks

This is equivalent to Convert(string) but does not require an instance.