GetBaseValue<T>(AvaloniaObject, AvaloniaProperty<T>) Method
Gets an AvaloniaProperty base value.
Definition
Namespace: Avalonia
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public static Optional<T> GetBaseValue<T>(
this AvaloniaObject target,
AvaloniaProperty<T> property
)
<ExtensionAttribute>
Public Shared Function GetBaseValue(Of T) (
target As AvaloniaObject,
property As AvaloniaProperty(Of T)
) As Optional(Of T)
[<ExtensionAttribute>]
static member GetBaseValue :
target : AvaloniaObject *
property : AvaloniaProperty<'T> -> Optional<'T>
Parameters
- AvaloniaObject
- The object.
- AvaloniaProperty(T)
- The property.
Type Parameters
Return Value
Optional(T)
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type AvaloniaObject. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
For styled properties, gets the value of the property excluding animated values, otherwise Empty. Note that this method does not return property values that come from inherited or default values. For direct properties returns the current value of the property.
See Also
Reference
AvaloniaObjectExtensions Class
GetBaseValue Overload
Avalonia Namespace