In This Article

BarsCloneService Class

Defines an implementation of CloneServiceBase customized for use specifically with Bars controls.

public class BarsCloneService : CloneServiceBase, ICloneService
Inheritance:
object CloneServiceBase object
Implements:
ICloneService

Constructors

BarsCloneService()

Initializes an instance of the class.

public BarsCloneService()

Methods

CreateCloneCore(object?, CloneOptions?, Type?)

Performs the core logic of cloning an object.

protected override object? CreateCloneCore(object? original, CloneOptions? options, Type? defaultType)
Parameter Type Description
original object

The original object to be cloned.

options CloneOptions

The options to use when cloning. When not specified, default options will be used.

defaultType Type

Optionally defines the default type of object to be created when not specified by options.

Returns

object:

A clone of the original object when possible. Otherwise, null or the original object is returned (depending on settings).

IsTransferableProperty(object, object, AvaloniaProperty)

Tests if an Avalonia.AvaloniaProperty supports transfer.

protected override bool IsTransferableProperty(object source, object target, AvaloniaProperty property)
Parameter Type Description
source object

The source object.

target object

The target object.

property AvaloniaProperty

The property to examine.

Returns

bool:

true if the property can be transferred; otherwise false if it cannot be transferred.

ResolveTargetAvaloniaProperty(AvaloniaObject, AvaloniaObject, AvaloniaProperty)

Returns the Avalonia.AvaloniaProperty of the target which should receive the value of a Avalonia.AvaloniaProperty on the source.

protected override AvaloniaProperty? ResolveTargetAvaloniaProperty(AvaloniaObject source, AvaloniaObject target, AvaloniaProperty sourceProperty)
Parameter Type Description
source AvaloniaObject

The source object.

target AvaloniaObject

The target object.

sourceProperty AvaloniaProperty

The property on the source.

Returns

AvaloniaProperty:

The Avalonia.AvaloniaProperty to be used by the target; otherwise null if a target property is unavailable.

TransferAvaloniaProperty(AvaloniaObject, AvaloniaObject, AvaloniaProperty, AvaloniaProperty?)

Transfers the value of a Avalonia.AvaloniaProperty on the source to a Avalonia.AvaloniaProperty on the target.

protected override void TransferAvaloniaProperty(AvaloniaObject source, AvaloniaObject target, AvaloniaProperty sourceProperty, AvaloniaProperty? targetProperty)
Parameter Type Description
source AvaloniaObject

The source object.

target AvaloniaObject

The target object.

sourceProperty AvaloniaProperty

The property on the source.

targetProperty AvaloniaProperty

The property on the target.

Inherited Members

Extension Methods