ICustomProperty ICustomProperty ICustomProperty Interface

Implements custom property definition support for data binding sources that are implemented using COM.

Syntax

Declaration

public interface ICustomPropertypublic interface ICustomPropertyPublic Interface ICustomProperty

Remarks

ICustomProperty represents a property on an instance of an object, but the calling patterns support the ability to implement the interface per owner type.

Properties summary

Gets a value that determines whether the custom property supports read access.

Gets a value that determines whether the custom property supports write access.

Gets the path-relevant name of the property.

Gets the underlying type of the custom property.

Methods summary

Gets the value at an index location, for cases where the custom property has indexer support.

Gets the value of the custom property from a particular instance.

Sets the value at an index location, for cases where the custom property has indexer support.

Sets the custom property value on a specified instance.

Properties

  • CanRead
    CanRead
    CanRead
    CanRead

    Gets a value that determines whether the custom property supports read access.

    public bool CanRead { get; }public bool CanRead { get; }Public ReadOnly Property CanRead As bool

    Property Value

    • bool
      bool
      bool

      true if the property value can be read as a data source. false if the property cannot be a data source value.

  • CanWrite
    CanWrite
    CanWrite
    CanWrite

    Gets a value that determines whether the custom property supports write access.

    public bool CanWrite { get; }public bool CanWrite { get; }Public ReadOnly Property CanWrite As bool

    Property Value

    • bool
      bool
      bool

      true if the value can be written to through a data source relationship in a two-way binding. false if the property cannot be written to.

  • Name
    Name
    Name
    Name

    Gets the path-relevant name of the property.

    public string Name { get; }public string Name { get; }Public ReadOnly Property Name As string

    Property Value

    • string
      string
      string

      The name of the property as it would be specified in a binding expression.

  • Type
    Type
    Type
    Type

    Gets the underlying type of the custom property.

    public TypeName Type { get; }public TypeName Type { get; }Public ReadOnly Property Type As TypeName

    Property Value

    • The underlying type, with relevant information as the values of the TypeName structure. TypeName provides the infrastructure such that property backing does not have to resemble common language runtime (CLR) and System.Type definitions.

Methods

  • GetIndexedValue(System.Object,System.Object)
    GetIndexedValue(System.Object,System.Object)
    GetIndexedValue(System.Object,System.Object)
    GetIndexedValue(System.Object,System.Object)

    Gets the value at an index location, for cases where the custom property has indexer support.

    public object GetIndexedValue(System.Object target,System.Object index)public object GetIndexedValue(System.Object target,System.Object index)Public Function GetIndexedValue(target As System.Object,index As System.Object) As object

    Parameters

    • target
      System.Object
      System.Object
      System.Object

      The owning instance.

    • index
      System.Object
      System.Object
      System.Object

      The index to get.

    Returns

    • object
      object
      object

      The retrieved value at the index.

  • GetValue(System.Object)
    GetValue(System.Object)
    GetValue(System.Object)
    GetValue(System.Object)

    Gets the value of the custom property from a particular instance.

    public object GetValue(System.Object target)public object GetValue(System.Object target)Public Function GetValue(target As System.Object) As object

    Parameters

    • target
      System.Object
      System.Object
      System.Object

      The owning instance.

    Returns

    • object
      object
      object

      The retrieved value.

  • SetIndexedValue(System.Object,System.Object,System.Object)
    SetIndexedValue(System.Object,System.Object,System.Object)
    SetIndexedValue(System.Object,System.Object,System.Object)
    SetIndexedValue(System.Object,System.Object,System.Object)

    Sets the value at an index location, for cases where the custom property has indexer support.

    public void SetIndexedValue(System.Object target,System.Object value,System.Object index)public void SetIndexedValue(System.Object target,System.Object value,System.Object index)Public Function SetIndexedValue(target As System.Object,value As System.Object,index As System.Object) As void

    Parameters

    • target
      System.Object
      System.Object
      System.Object

      The owner instance.

    • value
      System.Object
      System.Object
      System.Object

      The value to set.

    • index
      System.Object
      System.Object
      System.Object

      The index location to set to.

  • SetValue(System.Object,System.Object)
    SetValue(System.Object,System.Object)
    SetValue(System.Object,System.Object)
    SetValue(System.Object,System.Object)

    Sets the custom property value on a specified instance.

    public void SetValue(System.Object target,System.Object value)public void SetValue(System.Object target,System.Object value)Public Function SetValue(target As System.Object,value As System.Object) As void

    Parameters

    • target
      System.Object
      System.Object
      System.Object

      The owner instance.

    • value
      System.Object
      System.Object
      System.Object

      The value to set.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.WebHostHiddenAttribute
Windows.Foundation.Metadata.GuidAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.UI.Xaml.Data.dll