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 |
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; otherwisefalse
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
; otherwisenull
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
- CloneServiceBase.CanCloneAvaloniaPropertyValue(AvaloniaObject, AvaloniaProperty)
- CloneServiceBase.CreateClone(object)
- CloneServiceBase.CreateClone(object, CloneOptions)
- CloneServiceBase.CreateClone<T>(object)
- CloneServiceBase.CreateClone<T>(object, CloneOptions)
- CloneServiceBase.CreateInstance(object, CloneOptions, Type)
- CloneServiceBase.GetAvaloniaProperties(AvaloniaObject)
- CloneServiceBase.GetProperties(object)
- CloneServiceBase.IsPropertyExplicitlyAssigned(AvaloniaObject, AvaloniaProperty)
- CloneServiceBase.IsTransferableProperty(object, PropertyDescriptor)
- CloneServiceBase.ResolveTargetProperty(object, object, PropertyDescriptor)
- CloneServiceBase.TransferProperty(object, object, PropertyDescriptor, PropertyDescriptor)
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()