File

projects/wms-framework/src/lib/basecomponentmodel/PropertyMetadata.ts

Description

Property metdadata class

Index

Properties

Constructor

constructor(arg1?: unknown, arg2?: unknown)
Parameters :
Name Type Optional
arg1 unknown Yes
arg2 unknown Yes

Properties

changedHandler
Type : function
Default value : null
defaultValue
Type : unknown
Default value : null

The default value

import { DependencyPropertyChangedEventArgs } from './DependencyPropertyChangedEventArgs';

/**
 * Property metdadata class
 *
 * @export
 * @class PropertyMetadata
 * @wType System.Windows.PropertyMetadata
 */
export class PropertyMetadata {
  /**
   * The default value
   *
   * @type {unknown}
   * @memberof PropertyMetadata
   * @wProperty DefaultValue
   */
  defaultValue: unknown = null;

  changedHandler: (
    sender: any,
    args: DependencyPropertyChangedEventArgs
  ) => void = null;

  constructor(
    arg1: (sender: any, args: DependencyPropertyChangedEventArgs) => void
  );
  constructor(arg1: unknown);
  constructor(
    arg1: unknown,
    arg2: (sender: any, args: DependencyPropertyChangedEventArgs) => void
  );
  constructor(arg1?: unknown, arg2?: unknown) {
    if (arg2 instanceof Function) {
      this.defaultValue = arg1;
      this.changedHandler = arg2 as (
        sender: any,
        args: DependencyPropertyChangedEventArgs
      ) => void;
    } else if (arg1 instanceof Function) {
      this.changedHandler = arg1 as (
        sender: any,
        args: DependencyPropertyChangedEventArgs
      ) => void;
    } else {
      this.defaultValue = arg1;
    }
  }
}

result-matching ""

    No results matching ""