C# Класс ICSharpCode.AvalonEdit.Utils.ExtensionMethods

Показать файл Открыть проект

Открытые методы

Метод Описание
AddRange ( ICollection collection, IEnumerable elements ) : void
CoerceValue ( double value, double minimum, double maximum ) : double

Forces the value to stay between mininum and maximum.

CoerceValue ( int value, int minimum, int maximum ) : int

Forces the value to stay between mininum and maximum.

CreateTypeface ( FrameworkElement fe ) : Typeface

Creates typeface from the framework element.

GetAttributeOrNull ( XmlElement element, string attributeName ) : string

Gets the value of the attribute, or null if the attribute does not exist.

GetBoolAttribute ( XmlElement element, string attributeName ) : bool?

Gets the value of the attribute as boolean, or null if the attribute does not exist.

GetBoolAttribute ( XmlReader reader, string attributeName ) : bool?

Gets the value of the attribute as boolean, or null if the attribute does not exist.

IsClose ( Size d1, Size d2 ) : bool

Returns true if the doubles are close (difference smaller than 0.01).

IsClose ( Vector d1, Vector d2 ) : bool

Returns true if the doubles are close (difference smaller than 0.01).

IsClose ( double d1, double d2 ) : bool

Returns true if the doubles are close (difference smaller than 0.01).

Sequence ( value ) : IEnumerable

Creates an IEnumerable with a single value.

ToSystemDrawing ( Point p ) : System.Drawing.Point
ToWpf ( System.Drawing.Point p ) : Point
ToWpf ( System.Drawing.Rectangle rect ) : Rect
ToWpf ( System.Drawing.Size s ) : Size
TransformFromDevice ( Point point, Visual visual ) : Point
TransformFromDevice ( Rect rect, Visual visual ) : Rect
TransformFromDevice ( Size size, Visual visual ) : Size
TransformToDevice ( Point point, Visual visual ) : Point
TransformToDevice ( Rect rect, Visual visual ) : Rect
TransformToDevice ( Size size, Visual visual ) : Size
VisualAncestorsAndSelf ( DependencyObject obj ) : IEnumerable

Приватные методы

Метод Описание
CheckIsFrozen ( Freezable f ) : void
Log ( bool condition, string format ) : void

Описание методов

AddRange() публичный статический Метод

public static AddRange ( ICollection collection, IEnumerable elements ) : void
collection ICollection
elements IEnumerable
Результат void

CoerceValue() публичный статический Метод

Forces the value to stay between mininum and maximum.
public static CoerceValue ( double value, double minimum, double maximum ) : double
value double
minimum double
maximum double
Результат double

CoerceValue() публичный статический Метод

Forces the value to stay between mininum and maximum.
public static CoerceValue ( int value, int minimum, int maximum ) : int
value int
minimum int
maximum int
Результат int

CreateTypeface() публичный статический Метод

Creates typeface from the framework element.
public static CreateTypeface ( FrameworkElement fe ) : Typeface
fe FrameworkElement
Результат Typeface

GetAttributeOrNull() публичный статический Метод

Gets the value of the attribute, or null if the attribute does not exist.
public static GetAttributeOrNull ( XmlElement element, string attributeName ) : string
element XmlElement
attributeName string
Результат string

GetBoolAttribute() публичный статический Метод

Gets the value of the attribute as boolean, or null if the attribute does not exist.
public static GetBoolAttribute ( XmlElement element, string attributeName ) : bool?
element XmlElement
attributeName string
Результат bool?

GetBoolAttribute() публичный статический Метод

Gets the value of the attribute as boolean, or null if the attribute does not exist.
public static GetBoolAttribute ( XmlReader reader, string attributeName ) : bool?
reader XmlReader
attributeName string
Результат bool?

IsClose() публичный статический Метод

Returns true if the doubles are close (difference smaller than 0.01).
public static IsClose ( Size d1, Size d2 ) : bool
d1 Size
d2 Size
Результат bool

IsClose() публичный статический Метод

Returns true if the doubles are close (difference smaller than 0.01).
public static IsClose ( Vector d1, Vector d2 ) : bool
d1 Vector
d2 Vector
Результат bool

IsClose() публичный статический Метод

Returns true if the doubles are close (difference smaller than 0.01).
public static IsClose ( double d1, double d2 ) : bool
d1 double
d2 double
Результат bool

Sequence() публичный статический Метод

Creates an IEnumerable with a single value.
public static Sequence ( value ) : IEnumerable
Результат IEnumerable

ToSystemDrawing() публичный статический Метод

public static ToSystemDrawing ( Point p ) : System.Drawing.Point
p Point
Результат System.Drawing.Point

ToWpf() публичный статический Метод

public static ToWpf ( System.Drawing.Point p ) : Point
p System.Drawing.Point
Результат Point

ToWpf() публичный статический Метод

public static ToWpf ( System.Drawing.Rectangle rect ) : Rect
rect System.Drawing.Rectangle
Результат Rect

ToWpf() публичный статический Метод

public static ToWpf ( System.Drawing.Size s ) : Size
s System.Drawing.Size
Результат Size

TransformFromDevice() публичный статический Метод

public static TransformFromDevice ( Point point, Visual visual ) : Point
point Point
visual Visual
Результат Point

TransformFromDevice() публичный статический Метод

public static TransformFromDevice ( Rect rect, Visual visual ) : Rect
rect Rect
visual Visual
Результат Rect

TransformFromDevice() публичный статический Метод

public static TransformFromDevice ( Size size, Visual visual ) : Size
size Size
visual Visual
Результат Size

TransformToDevice() публичный статический Метод

public static TransformToDevice ( Point point, Visual visual ) : Point
point Point
visual Visual
Результат Point

TransformToDevice() публичный статический Метод

public static TransformToDevice ( Rect rect, Visual visual ) : Rect
rect Rect
visual Visual
Результат Rect

TransformToDevice() публичный статический Метод

public static TransformToDevice ( Size size, Visual visual ) : Size
size Size
visual Visual
Результат Size

VisualAncestorsAndSelf() публичный статический Метод

public static VisualAncestorsAndSelf ( DependencyObject obj ) : IEnumerable
obj DependencyObject
Результат IEnumerable