File

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

Description

UIElement support class.

Extends

DependencyObject

Index

Properties
Methods
Accessors

Properties

Private __internalVisibility
Type : boolean
Default value : true
Public AllowDrop
Type : boolean
Decorators :
@Dependency(UIElement.AllowDropProperty)

Gets or sets the allow drop value

Static AllowDropProperty
Type : DependencyProperty
Default value : new DependencyProperty( 'AllowDrop', false, null )

AllowDropProperty dependency property

Public AngularComponentId
Type : null
Default value : null
Public CacheMode
Type : any
Decorators :
@Dependency(UIElement.CacheModeProperty)

Gets or sets the cache mode value

Static CacheModeProperty
Type : DependencyProperty
Default value : new DependencyProperty( 'CacheMode', null, null )

CacheModeProperty dependency property

capturedMoveHandler
Type : function
capturedUpHandler
Type : function
Static ClipProperty
Type : DependencyProperty
Default value : new DependencyProperty( 'Clip', null, null )

ClipProperty dependency property

Private customCSSClasses
Type : string
Default value : ''

Custom property to save CSS classes that need to be applied to the control

Static EffectProperty
Type : DependencyProperty
Default value : new DependencyProperty( 'Effect', null, null )

EffectProperty dependency property

Public GotFocus
Type : SubscriptionEvent<void>
Default value : new SubscriptionEvent<(s: any, e: any) => void>()
Private hasAutoColumnGridParent
Type : boolean
Default value : false

Custom property to know if control is inside grid with auto columns

Public IsHitTestVisible
Type : boolean
Default value : false
Decorators :
@Dependency(UIElement.IsHitTestVisibleProperty)

IsHitTestVisible property

Static IsHitTestVisibleProperty
Type : DependencyProperty
Default value : new DependencyProperty( 'IsHitTestVisible', null, null )

IsHitTestVisibleProperty dependency property

Public KeyDown
Type : SubscriptionEvent<void>
Default value : new SubscriptionEvent<(s: any, e: any) => void>()
Public KeyUp
Type : SubscriptionEvent<void>
Default value : new SubscriptionEvent<(s: any, e: any) => void>()
Public LostFocus
Type : SubscriptionEvent<void>
Default value : new SubscriptionEvent<(sender: any, e: any) => void>()
Public MouseEnter
Type : SubscriptionEvent<void>
Default value : new SubscriptionEvent<(s: any, e: any) => MouseEventArgs>()
Public MouseLeave
Type : SubscriptionEvent<void>
Default value : new SubscriptionEvent<(s: any, e: any) => MouseEventArgs>()
Public MouseLeftButtonDown
Type : SubscriptionEvent<void>
Default value : new SubscriptionEvent<(s: any, e: MouseEventArgs) => void>()
Public MouseLeftButtonUp
Type : SubscriptionEvent<void>
Default value : new SubscriptionEvent<(s: any, e: MouseEventArgs) => void>()
Public MouseMove
Type : SubscriptionEvent<void>
Default value : new SubscriptionEvent<(s: any, e: MouseEventArgs) => void>()
Public MouseRightButtonDown
Type : SubscriptionEvent<void>
Default value : new SubscriptionEvent<(s: any, e: MouseEventArgs) => void>()
Public MouseRightButtonUp
Type : SubscriptionEvent<void>
Default value : new SubscriptionEvent<(s: any, e: MouseEventArgs) => void>()
Public Name
Type : string
Default value : ''

Name property

Public OnModelChange
Type : function

On model change handler reference

Public Opacity
Type : number
Decorators :
@Dependency(UIElement.OpacityProperty)

Gets or sets the opacity value

Static OpacityMaskProperty
Type : DependencyProperty
Default value : new DependencyProperty( 'OpacityMask', null, null )

OpacityMaskProperty dependency property

Static OpacityProperty
Type : DependencyProperty
Default value : new DependencyProperty( 'Opacity', 1, null )

OpacityProperty dependency property

Static ProjectionProperty
Type : DependencyProperty
Default value : new DependencyProperty( 'Projection', null, null )

ProjectionProperty dependency property

Public RenderSize
Type : Size
Decorators :
@Dependency(UIElement.RenderSizeProperty)

Gets the final render size of a UIElement.

Static RenderSizeProperty
Type : DependencyProperty
Default value : new DependencyProperty( 'RenderSize', new Size(0, 0), null )

RenderSizeProperty dependency property

Public RenderTransform
Type : any
Decorators :
@Dependency(UIElement.RenderTransformProperty)

Gets or sets the render transform

Public RenderTransformOrigin
Type : any
Decorators :
@Dependency(UIElement.RenderTransformOriginProperty)

Gets or sets the render transform origin

Static RenderTransformOriginProperty
Type : DependencyProperty
Default value : new DependencyProperty('RenderTransformOrigin', null, null)

RenderTransformOriginProperty dependency property

Static RenderTransformProperty
Type : DependencyProperty
Default value : new DependencyProperty( 'RenderTransform', null, null )

RenderTransformProperty dependency property

Public Spin
Type : SubscriptionEvent<void>
Default value : new SubscriptionEvent<(sender: any, e: any) => void>()
Static UseLayoutRoundingProperty
Type : DependencyProperty
Default value : new DependencyProperty( 'UseLayoutRounding', true, null )

UseLayoutRoundingProperty dependency property

Static VisibilityProperty
Default value : new DependencyProperty('Visibility', true, null)

VisibilityProperty dependency property

Protected bindingExpressions
Default value : new SimpleDictionary< string, BindingExpression >()
Inherited from DependencyObject
Public BindingValidationError
Default value : new SubscriptionEvent< (sender: any, e: BindingValidationErrorEventArgs) => void >()
Inherited from DependencyObject

Event for validation errors

Public change
Type : SubscriptionEvent<void>
Default value : new SubscriptionEvent()
Inherited from DependencyObject

Infrastructure event for notifying event changes

Public Dispatcher
Type : Dispatcher
Default value : Dispatcher.GetDispatcher()
Inherited from DependencyObject
isEnableSetPropertiesRegistry
Type : boolean
Default value : true
Inherited from DependencyObject

Flag which indicates if the dependency property set mechanism is enable

Public IsInitializingBindings
Type : boolean
Default value : false
Inherited from DependencyObject

Property to determine if bindings are being initialized

previousValidationMessage
Type : string
Default value : ''
Inherited from DependencyObject
Protected properties
Type : object
Default value : {}
Inherited from DependencyObject
Private setPropertiesRegistry
Type : Map<string | boolean>
Default value : new Map()
Inherited from DependencyObject

Registry with dependencies properties which has been set

validationerr
Default value : false
Inherited from DependencyObject
validationMessagesStack
Type : Array<>
Default value : []
Inherited from DependencyObject

Keeps a queue of validation messages registered on the current Dependency Object

Methods

Public Arrange
Arrange(obj: any)

Arrange method

Parameters :
Name Type Optional
obj any No
Returns : void
Public captureMouse
captureMouse()

Captures the mouse events

Returns : boolean
Public Measure
Measure(obj: any)

Measure method

Parameters :
Name Type Optional
obj any No
Returns : any
Public releaseMouseCapture
releaseMouseCapture()
Returns : void
Protected SyncModelWithComponent
SyncModelWithComponent(params: any)
Parameters :
Name Type Optional Default value
params any No null
Returns : void
Public TransformToVisual
TransformToVisual(obj: UIElement)

Transforms to visual

Parameters :
Name Type Optional
obj UIElement No
Returns : any
Public UpdateLayout
UpdateLayout()
Returns : void
Public withName
withName(name: string)
Parameters :
Name Type Optional
name string No
Returns : UIElement
Private addRelatedSubscriptionIfRequired
addRelatedSubscriptionIfRequired(event: SubscriptionEvent<any>, theHandler: any, bindingExpression: BindingExpression)
Inherited from DependencyObject
Parameters :
Name Type Optional
event SubscriptionEvent<any> No
theHandler any No
bindingExpression BindingExpression No
Returns : void
Private addSubscriptionForTwoWayBindings
addSubscriptionForTwoWayBindings(dependencyProperty: DependencyProperty, binding: Binding, bindingExpression: BindingExpression)
Inherited from DependencyObject
Parameters :
Name Type Optional
dependencyProperty DependencyProperty No
binding Binding No
bindingExpression BindingExpression No
Returns : void
addsValidationMessage
addsValidationMessage(propKey: Binding | string, message: string)
Inherited from DependencyObject

Adds a new validation message associated to a binding or a property name

Parameters :
Name Type Optional
propKey Binding | string No
message string No
Returns : void
Private beginSubscribeToMultiPropertyPathChanges
beginSubscribeToMultiPropertyPathChanges(context: any, binding: Binding, dependencyProperty: DependencyProperty, bindingExpression: BindingExpression)
Inherited from DependencyObject
Parameters :
Name Type Optional
context any No
binding Binding No
dependencyProperty DependencyProperty No
bindingExpression BindingExpression No
Returns : void
Private checkForSubscriptoinToDataErrorInfo
checkForSubscriptoinToDataErrorInfo(currentContext: any, binding: Binding, propertyToSubscribe: string, bindingExpression: BindingExpression)
Inherited from DependencyObject
Parameters :
Name Type Optional
currentContext any No
binding Binding No
propertyToSubscribe string No
bindingExpression BindingExpression No
Returns : void
Public clearValue
clearValue(property: DependencyProperty)
Inherited from DependencyObject

Clears the dependency property value

Parameters :
Name Type Optional
property DependencyProperty No
Returns : void
Equals
Equals(obj: any)
Inherited from DependencyObject

Compares this dependency object agains another object.

Parameters :
Name Type Optional
obj any No
Returns : boolean

{boolean}

GetChild
GetChild(idx: number)
Inherited from DependencyObject

Gets the child element at the index position

Parameters :
Name Type Optional
idx number No
Returns : DependencyObject

{DependencyObject}

GetChildrenCount
GetChildrenCount()
Inherited from DependencyObject

Method o know the amount of children the parent has

Returns : number

{number}

GetHashCode
GetHashCode()
Inherited from DependencyObject

Gets a hash code for this dependency object.

Returns : number

{number}

Public getValue
getValue(property: DependencyProperty)
Inherited from DependencyObject

Gets the value of a dependency property

Parameters :
Name Type Optional
property DependencyProperty No
Returns : any
Private handleErrorsOnContext
handleErrorsOnContext(errorCtxt: INotifyDataErrorInfo, args: DataErrorsChangedEventArgs)
Inherited from DependencyObject

Check and register possible errors in an error context

Parameters :
Name Type Optional
errorCtxt INotifyDataErrorInfo No
args DataErrorsChangedEventArgs No
Returns : void
Public IsPropertySet
IsPropertySet(propertyName: string)
Inherited from DependencyObject

Indicates if the property has been already set.

Parameters :
Name Type Optional
propertyName string No
Returns : any
Private performDataErrorValidationIfRequired
performDataErrorValidationIfRequired(binding: Binding, theBindingContext: any)
Inherited from DependencyObject

Performs validation on model if the model implementes IDataErrorINfo

Parameters :
Name Type Optional
binding Binding No
theBindingContext any No
Returns : void
Private performRemoveValidationIfInValidationError
performRemoveValidationIfInValidationError(binding: Binding)
Inherited from DependencyObject

Performs the remove validation if the InValidationError is true

Parameters :
Name Type Optional
binding Binding No
Returns : void
Public performTargetObjectBindingUpdate
performTargetObjectBindingUpdate(dependencyProperty: DependencyProperty, binding: Binding)
Inherited from DependencyObject

Updates the target object value associated to the binding.

Parameters :
Name Type Optional
dependencyProperty DependencyProperty No
binding Binding No
Returns : void
Private preprocessValue
preprocessValue(property: DependencyProperty, value: any)
Inherited from DependencyObject

Preprocess value to be set to dependency property

Parameters :
Name Type Optional
property DependencyProperty No
value any No
Returns : any
Private recreateSubscriptionsForMultiPropertyBindingPath
recreateSubscriptionsForMultiPropertyBindingPath(currentContext: any, outerContext: any, properties: string[], propertyIndex: number, dependencyProperty: DependencyProperty, bindingExpression: BindingExpression, subscriptionsForCurrentBindingPath: Array<>)
Inherited from DependencyObject
Parameters :
Name Type Optional
currentContext any No
outerContext any No
properties string[] No
propertyIndex number No
dependencyProperty DependencyProperty No
bindingExpression BindingExpression No
subscriptionsForCurrentBindingPath Array<> No
Returns : void
Private registerSetPropertyIfRequired
registerSetPropertyIfRequired(name: string)
Inherited from DependencyObject

Register set property if required

Parameters :
Name Type Optional
name string No
Returns : void
Private removeSubscriptionsForMultiPropertyBindingPath
removeSubscriptionsForMultiPropertyBindingPath(subscriptionsForCurrentBindingPath: [], propertyIndex: number)
Inherited from DependencyObject
Parameters :
Name Type Optional
subscriptionsForCurrentBindingPath [] No
propertyIndex number No
Returns : void
removeValidationMessage
removeValidationMessage(propKey: Binding | string)
Inherited from DependencyObject

Removes a validation message associated to a binding or a property name

Parameters :
Name Type Optional
propKey Binding | string No
Returns : void
SetBinding
SetBinding(dependencyProperty: DependencyProperty, binding: Binding)
Inherited from DependencyObject

Sets a binding to the specified property at runtime

Parameters :
Name Type Optional Description
dependencyProperty DependencyProperty No

property to bind

binding Binding No

binding object

Returns : void
Public setValue
setValue(property: DependencyProperty, value: any)
Inherited from DependencyObject

Sets the value for a dependency property

Parameters :
Name Type Optional
property DependencyProperty No
value any No
Returns : void
Public setValueForScopedRegion
setValueForScopedRegion(property: DependencyProperty, value: any, scopedRegionManager: IRegionManager)
Inherited from DependencyObject

Sets the value for a dependency property. This is a workaround to support Scoped Region Managers. A research is required to find out the way to get the application region Manager when scoped region managers are used (when creating the DelayedRegionBehavior, the correct scoped region manager must be passed as an argument).

Parameters :
Name Type Optional
property DependencyProperty No
value any No
scopedRegionManager IRegionManager No
Returns : void
Protected shouldPreventDefaultSourceUpdate
shouldPreventDefaultSourceUpdate(dependencyProperty: DependencyProperty, binding: BindingExpression)
Inherited from DependencyObject
Parameters :
Name Type Optional
dependencyProperty DependencyProperty No
binding BindingExpression No
Returns : boolean
Private subscribeToBindingPathChanges
subscribeToBindingPathChanges(context: any, binding: Binding, dependencyProperty: DependencyProperty, bindingExpression: BindingExpression)
Inherited from DependencyObject
Parameters :
Name Type Optional
context any No
binding Binding No
dependencyProperty DependencyProperty No
bindingExpression BindingExpression No
Returns : void
Private subscribeToErrorsChangedInModel
subscribeToErrorsChangedInModel(errorCtxt: INotifyDataErrorInfo, propertyToSubscribe: string, bindingExpression: BindingExpression)
Inherited from DependencyObject
Parameters :
Name Type Optional
errorCtxt INotifyDataErrorInfo No
propertyToSubscribe string No
bindingExpression BindingExpression No
Returns : void
Private subscribeToPropertyChanges
subscribeToPropertyChanges(currentContext: any, outerContext: any, properties: string[], propertyIndex: number, dependencyProperty: DependencyProperty, bindingExpression: BindingExpression, subscriptionsForCurrentBindingPath: Array<>)
Inherited from DependencyObject
Parameters :
Name Type Optional
currentContext any No
outerContext any No
properties string[] No
propertyIndex number No
dependencyProperty DependencyProperty No
bindingExpression BindingExpression No
subscriptionsForCurrentBindingPath Array<> No
Returns : void
Private updateSourceOfBinding
updateSourceOfBinding(binding: Binding, outerContext: any, dependencyProperty: DependencyProperty)
Inherited from DependencyObject

Updates the source of a binding

Parameters :
Name Type Optional
binding Binding No
outerContext any No
dependencyProperty DependencyProperty No
Returns : void

Accessors

Visibility
getVisibility()
setVisibility(value: boolean)

Gets or sets the visibility of the control

Parameters :
Name Type Optional
value boolean No
Returns : void
HasAutoColumnGridParent
getHasAutoColumnGridParent()

Gets the autoColumnGridParent flag

setHasAutoColumnGridParent(value)

Sets the autoColumnGridParent flag

Parameters :
Name Optional
value No
Returns : void
CustomCSSClasses
getCustomCSSClasses()

Gets the custom CSS Classes property

setCustomCSSClasses(value)

Sets the custom CSS Classes property

Parameters :
Name Optional
value No
Returns : void
import { DependencyObject } from './DependencyObject';
import { SubscriptionEvent } from '../utils/SubscriptionEvent';
import { MouseEventArgs } from '../models/events/MouseEventArgs';
import { DependencyProperty } from './DependencyProperty';
import { Debugger } from '../diagnostics/Debugger';
import { KeyEventArgs } from '../models/events/KeyEventArgs';
import { Dependency } from './Dependency';
import { Size } from '../models/controls/Size';

/**
 * UIElement support class.
 *
 * @export
 * @class UIElement
 * @extends {DependencyObject}
 * @wType System.Windows.UIElement
 */

export class UIElement extends DependencyObject {
  /**
   * On model change handler reference
   *
   * @memberof UIElement
   * @wIgnore
   */
  public OnModelChange: (prop: string) => void;

  /**
   * AllowDropProperty dependency property
   *
   * @static
   * @type {DependencyProperty}
   * @memberof UIElement
   * @wProperty AllowDropProperty
   */
  static AllowDropProperty: DependencyProperty = new DependencyProperty(
    'AllowDrop',
    false,
    null
  );

  /**
   * CacheModeProperty dependency property
   *
   * @static
   * @type {DependencyProperty}
   * @memberof UIElement
   */
  static CacheModeProperty: DependencyProperty = new DependencyProperty(
    'CacheMode',
    null,
    null
  );

  /**
   * ClipProperty dependency property
   *
   * @static
   * @type {DependencyProperty}
   * @memberof UIElement
   */
  static ClipProperty: DependencyProperty = new DependencyProperty(
    'Clip',
    null,
    null
  );

  /**
   * EffectProperty dependency property
   *
   * @static
   * @type {DependencyProperty}
   * @memberof UIElement
   */
  static EffectProperty: DependencyProperty = new DependencyProperty(
    'Effect',
    null,
    null
  );

  /**
   * IsHitTestVisibleProperty dependency property
   *
   * @static
   * @type {DependencyProperty}
   * @memberof UIElement
   */
  static IsHitTestVisibleProperty: DependencyProperty = new DependencyProperty(
    'IsHitTestVisible',
    null,
    null
  );

  /**
   * OpacityMaskProperty dependency property
   *
   * @static
   * @type {DependencyProperty}
   * @memberof UIElement
   */
  static OpacityMaskProperty: DependencyProperty = new DependencyProperty(
    'OpacityMask',
    null,
    null
  );

  /**
   * OpacityProperty dependency property
   *
   * @static
   * @type {DependencyProperty}
   * @memberof UIElement
   */
  static OpacityProperty: DependencyProperty = new DependencyProperty(
    'Opacity',
    1,
    null
  );

  /**
   * ProjectionProperty dependency property
   *
   * @static
   * @type {DependencyProperty}
   * @memberof UIElement
   */
  static ProjectionProperty: DependencyProperty = new DependencyProperty(
    'Projection',
    null,
    null
  );

  /**
   * RenderSizeProperty dependency property
   *
   * @static
   * @type {DependencyProperty}
   * @memberof UIElement
   */
  static RenderSizeProperty: DependencyProperty = new DependencyProperty(
    'RenderSize',
    new Size(0, 0),
    null
  );

  /**
   * RenderTransformOriginProperty dependency property
   *
   * @static
   * @type {DependencyProperty}
   * @memberof UIElement
   */
  static RenderTransformOriginProperty: DependencyProperty =
    new DependencyProperty('RenderTransformOrigin', null, null);

  /**
   * RenderTransformProperty dependency property
   *
   * @static
   * @type {DependencyProperty}
   * @memberof UIElement
   */
  static RenderTransformProperty: DependencyProperty = new DependencyProperty(
    'RenderTransform',
    null,
    null
  );

  /**
   * UseLayoutRoundingProperty dependency property
   *
   * @static
   * @type {DependencyProperty}
   * @memberof UIElement
   */
  static UseLayoutRoundingProperty: DependencyProperty = new DependencyProperty(
    'UseLayoutRounding',
    true,
    null
  );

  /**
   * VisibilityProperty dependency property
   *
   * @static
   * @type {DependencyProperty}
   * @memberof UIElement
   */
  static VisibilityProperty = new DependencyProperty('Visibility', true, null);

  public MouseLeftButtonDown: SubscriptionEvent<
    (s: any, e: MouseEventArgs) => void
  > = new SubscriptionEvent<(s: any, e: MouseEventArgs) => void>();
  public MouseRightButtonDown: SubscriptionEvent<
    (s: any, e: MouseEventArgs) => void
  > = new SubscriptionEvent<(s: any, e: MouseEventArgs) => void>();
  public MouseEnter: SubscriptionEvent<(s: any, e: MouseEventArgs) => void> =
    new SubscriptionEvent<(s: any, e: any) => MouseEventArgs>();
  public MouseLeave: SubscriptionEvent<(s: any, e: MouseEventArgs) => void> =
    new SubscriptionEvent<(s: any, e: any) => MouseEventArgs>();
  public MouseLeftButtonUp: SubscriptionEvent<
    (s: any, e: MouseEventArgs) => void
  > = new SubscriptionEvent<(s: any, e: MouseEventArgs) => void>();
  public MouseRightButtonUp: SubscriptionEvent<
    (s: any, e: MouseEventArgs) => void
  > = new SubscriptionEvent<(s: any, e: MouseEventArgs) => void>();
  public MouseMove: SubscriptionEvent<(s: any, e: MouseEventArgs) => void> =
    new SubscriptionEvent<(s: any, e: MouseEventArgs) => void>();
  public KeyDown: SubscriptionEvent<(s: any, e: KeyEventArgs) => void> =
    new SubscriptionEvent<(s: any, e: any) => void>();
  public KeyUp: SubscriptionEvent<(s: any, e: KeyEventArgs) => void> =
    new SubscriptionEvent<(s: any, e: any) => void>();
  public GotFocus: SubscriptionEvent<(s: any, e: any) => void> =
    new SubscriptionEvent<(s: any, e: any) => void>();
  public LostFocus: SubscriptionEvent<(s: any, e: any) => void> =
    new SubscriptionEvent<(sender: any, e: any) => void>();
  public Spin: SubscriptionEvent<(s: any, e: any) => void> =
    new SubscriptionEvent<(sender: any, e: any) => void>();

  /**
   * Name property
   *
   * @memberof UIElement
   * @wIgnore
   */
  public Name = '';

  // this property is a WebMapFramework property.
  public AngularComponentId = null;

  /**
   * Gets or sets the opacity value
   *
   * @memberof UIElement
   */
  @Dependency(UIElement.OpacityProperty)
  public Opacity: number;

  /**
   * Custom property to know if control is inside grid with auto columns
   *
   * @private
   * @type {boolean}
   * @memberof UIElement
   */
  private hasAutoColumnGridParent: boolean = false;

  /**
   * Custom property to save CSS classes that need to be applied to the control
   *
   * @private
   * @type {string}
   * @memberof UIElement
   */
  private customCSSClasses: string = '';

  /**
   * Gets or sets the allow drop value
   *
   * @memberof UIElement
   */
  @Dependency(UIElement.AllowDropProperty)
  public AllowDrop: boolean;

  /**
   * Gets or sets the cache mode value
   *
   * @memberof UIElement
   */
  @Dependency(UIElement.CacheModeProperty)
  public CacheMode: any;

  private __internalVisibility: boolean = true;

  /**
   * Gets the final render size of a UIElement.
   *
   * @memberof UIElement
   */
  @Dependency(UIElement.RenderSizeProperty)
  public RenderSize: Size;

  /**
   * Gets or sets the render transform origin
   *
   * @memberof UIElement
   */
  @Dependency(UIElement.RenderTransformOriginProperty)
  public RenderTransformOrigin: any;

  /**
   * Gets or sets the render transform
   *
   * @type {boolean}
   * @memberof UIElement
   */
  @Dependency(UIElement.RenderTransformProperty)
  public RenderTransform: any;

  /**
   * IsHitTestVisible property
   * @type {boolean}
   * @memberof UIElement
   */
  @Dependency(UIElement.IsHitTestVisibleProperty)
  public IsHitTestVisible: boolean = false;

  /**
   * Gets or sets the visibility of the control
   *
   * @type {boolean}
   * @memberof UIElement
   */
  set Visibility(value: boolean) {
    this.setValue(UIElement.VisibilityProperty, value);
  }

  get Visibility(): boolean {
    return this.getValue(UIElement.VisibilityProperty);
  }

  capturedUpHandler: (e: MouseEvent) => void;
  capturedMoveHandler: (e: MouseEvent) => void;

  public withName(name: string): UIElement {
    this.Name = name;
    return this;
  }

  /**
   * Transforms to visual
   *
   * @param {UIElement} obj
   * @returns {*}
   * @memberof UIElement
   * @wNoMap
   */
  public TransformToVisual(obj: UIElement): any {
    Debugger.Throw('Not implemented');
  }
  public UpdateLayout(): void {
    // left blank
  }

  /**
   * Captures the mouse events
   *
   * @returns {boolean}
   * @memberof UIElement
   * @wIgnore
   */
  public captureMouse(): boolean {
    this.capturedUpHandler = (evn) => {
      this.MouseLeftButtonUp.fire([this, new MouseEventArgs(evn)]);
    };
    this.capturedMoveHandler = (evn) => {
      this.MouseMove.fire([this, new MouseEventArgs(evn)]);
    };
    document.addEventListener('mouseup', this.capturedUpHandler);
    document.addEventListener('mousemove', this.capturedMoveHandler);
    return true;
  }
  public releaseMouseCapture() {
    document.removeEventListener('mouseup', this.capturedUpHandler);
    document.removeEventListener('mousemove', this.capturedMoveHandler);
    this.capturedUpHandler = undefined;
    this.capturedMoveHandler = undefined;
  }

  /**
   * Arrange method
   *
   * @param {*} obj
   * @memberof UIElement
   * @wNoMap
   */
  public Arrange(obj: any) {
    Debugger.Throw('Not implemented');
  }

  /**
   * Measure method
   *
   * @param {*} obj
   * @memberof UIElement
   * @wNoMap
   */
  public Measure(obj: any): any {
    Debugger.Throw('Not implemented');
  }

  /* Method to be overrided in inherit classes */
  protected SyncModelWithComponent(params: any = null): void {}

  /**
   * Gets the autoColumnGridParent flag
   *
   * @memberof UIElement
   * @wIgnore
   */
  public get HasAutoColumnGridParent() {
    return this.hasAutoColumnGridParent;
  }
  /**
   * Sets the autoColumnGridParent flag
   *
   * @memberof UIElement
   * @wIgnore
   */
  public set HasAutoColumnGridParent(value) {
    if (value !== this.hasAutoColumnGridParent) {
      this.hasAutoColumnGridParent = value;
      this.change.fire(['HasAutoColumnGridParent']);
    }
  }

  /**
   * Gets the custom CSS Classes property
   *
   * @memberof UIElement
   * @wIgnore
   */
  public get CustomCSSClasses() {
    return this.customCSSClasses;
  }
  /**
   * Sets the custom CSS Classes property
   *
   * @memberof UIElement
   * @wIgnore
   */
  public set CustomCSSClasses(value) {
    if (value !== this.customCSSClasses) {
      this.customCSSClasses = value;
      this.change.fire(['CustomCSSClasses']);
    }
  }
}

result-matching ""

    No results matching ""