projects/wms-framework/src/lib/basecomponentmodel/UIElement.ts
UIElement support class.
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
|
Defined in
DependencyObject:65
|
Public BindingValidationError |
Default value : new SubscriptionEvent<
(sender: any, e: BindingValidationErrorEventArgs) => void
>()
|
Inherited from
DependencyObject
|
Defined in
DependencyObject:78
|
Event for validation errors |
Public change |
Type : SubscriptionEvent<void>
|
Default value : new SubscriptionEvent()
|
Inherited from
DependencyObject
|
Defined in
DependencyObject:61
|
Infrastructure event for notifying event changes |
Public Dispatcher |
Type : Dispatcher
|
Default value : Dispatcher.GetDispatcher()
|
Inherited from
DependencyObject
|
Defined in
DependencyObject:55
|
isEnableSetPropertiesRegistry |
Type : boolean
|
Default value : true
|
Inherited from
DependencyObject
|
Defined in
DependencyObject:125
|
Flag which indicates if the dependency property set mechanism is enable |
Public IsInitializingBindings |
Type : boolean
|
Default value : false
|
Inherited from
DependencyObject
|
Defined in
DependencyObject:178
|
Property to determine if bindings are being initialized |
previousValidationMessage |
Type : string
|
Default value : ''
|
Inherited from
DependencyObject
|
Defined in
DependencyObject:70
|
Protected properties |
Type : object
|
Default value : {}
|
Inherited from
DependencyObject
|
Defined in
DependencyObject:64
|
Private setPropertiesRegistry |
Type : Map<string | boolean>
|
Default value : new Map()
|
Inherited from
DependencyObject
|
Defined in
DependencyObject:116
|
Registry with dependencies properties which has been set |
validationerr |
Default value : false
|
Inherited from
DependencyObject
|
Defined in
DependencyObject:69
|
validationMessagesStack |
Type : Array<>
|
Default value : []
|
Inherited from
DependencyObject
|
Defined in
DependencyObject:106
|
Keeps a queue of validation messages registered on the current Dependency Object |
Public Arrange | ||||||
Arrange(obj: any)
|
||||||
Arrange method
Parameters :
Returns :
void
|
Public captureMouse |
captureMouse()
|
Captures the mouse events
Returns :
boolean
|
Public Measure | ||||||
Measure(obj: any)
|
||||||
Measure method
Parameters :
Returns :
any
|
Public releaseMouseCapture |
releaseMouseCapture()
|
Returns :
void
|
Protected SyncModelWithComponent | ||||||||
SyncModelWithComponent(params: any)
|
||||||||
Parameters :
Returns :
void
|
Public TransformToVisual | ||||||
TransformToVisual(obj: UIElement)
|
||||||
Transforms to visual
Parameters :
Returns :
any
|
Public UpdateLayout |
UpdateLayout()
|
Returns :
void
|
Public withName | ||||||
withName(name: string)
|
||||||
Parameters :
Returns :
UIElement
|
Private addRelatedSubscriptionIfRequired | ||||||||||||
addRelatedSubscriptionIfRequired(event: SubscriptionEvent<any>, theHandler: any, bindingExpression: BindingExpression)
|
||||||||||||
Inherited from
DependencyObject
|
||||||||||||
Defined in
DependencyObject:502
|
||||||||||||
Parameters :
Returns :
void
|
Private addSubscriptionForTwoWayBindings | ||||||||||||
addSubscriptionForTwoWayBindings(dependencyProperty: DependencyProperty, binding: Binding, bindingExpression: BindingExpression)
|
||||||||||||
Inherited from
DependencyObject
|
||||||||||||
Defined in
DependencyObject:383
|
||||||||||||
Parameters :
Returns :
void
|
addsValidationMessage | |||||||||
addsValidationMessage(propKey: Binding | string, message: string)
|
|||||||||
Inherited from
DependencyObject
|
|||||||||
Defined in
DependencyObject:135
|
|||||||||
Adds a new validation message associated to a binding or a property name
Parameters :
Returns :
void
|
Private beginSubscribeToMultiPropertyPathChanges | |||||||||||||||
beginSubscribeToMultiPropertyPathChanges(context: any, binding: Binding, dependencyProperty: DependencyProperty, bindingExpression: BindingExpression)
|
|||||||||||||||
Inherited from
DependencyObject
|
|||||||||||||||
Defined in
DependencyObject:542
|
|||||||||||||||
Parameters :
Returns :
void
|
Private checkForSubscriptoinToDataErrorInfo | |||||||||||||||
checkForSubscriptoinToDataErrorInfo(currentContext: any, binding: Binding, propertyToSubscribe: string, bindingExpression: BindingExpression)
|
|||||||||||||||
Inherited from
DependencyObject
|
|||||||||||||||
Defined in
DependencyObject:716
|
|||||||||||||||
Parameters :
Returns :
void
|
Public clearValue | ||||||
clearValue(property: DependencyProperty)
|
||||||
Inherited from
DependencyObject
|
||||||
Defined in
DependencyObject:212
|
||||||
Clears the dependency property value
Parameters :
Returns :
void
|
Equals | ||||||
Equals(obj: any)
|
||||||
Inherited from
DependencyObject
|
||||||
Defined in
DependencyObject:201
|
||||||
Compares this dependency object agains another object.
Parameters :
Returns :
boolean
{boolean} |
GetChild | ||||||
GetChild(idx: number)
|
||||||
Inherited from
DependencyObject
|
||||||
Defined in
DependencyObject:928
|
||||||
Gets the child element at the index position
Parameters :
Returns :
DependencyObject
{DependencyObject} |
GetChildrenCount |
GetChildrenCount()
|
Inherited from
DependencyObject
|
Defined in
DependencyObject:916
|
Method o know the amount of children the parent has
Returns :
number
{number} |
GetHashCode |
GetHashCode()
|
Inherited from
DependencyObject
|
Defined in
DependencyObject:187
|
Gets a hash code for this dependency object.
Returns :
number
{number} |
Public getValue | ||||||
getValue(property: DependencyProperty)
|
||||||
Inherited from
DependencyObject
|
||||||
Defined in
DependencyObject:226
|
||||||
Gets the value of a dependency property
Parameters :
Returns :
any
|
Private handleErrorsOnContext | |||||||||
handleErrorsOnContext(errorCtxt: INotifyDataErrorInfo, args: DataErrorsChangedEventArgs)
|
|||||||||
Inherited from
DependencyObject
|
|||||||||
Defined in
DependencyObject:777
|
|||||||||
Check and register possible errors in an error context
Parameters :
Returns :
void
|
Public IsPropertySet | ||||||
IsPropertySet(propertyName: string)
|
||||||
Inherited from
DependencyObject
|
||||||
Defined in
DependencyObject:376
|
||||||
Indicates if the property has been already set.
Parameters :
Returns :
any
|
Private performDataErrorValidationIfRequired |
performDataErrorValidationIfRequired(binding: Binding, theBindingContext: any)
|
Inherited from
DependencyObject
|
Defined in
DependencyObject:481
|
Performs validation on model if the model implementes IDataErrorINfo
Returns :
void
|
Private performRemoveValidationIfInValidationError | ||||||
performRemoveValidationIfInValidationError(binding: Binding)
|
||||||
Inherited from
DependencyObject
|
||||||
Defined in
DependencyObject:461
|
||||||
Performs the remove validation if the InValidationError is true
Parameters :
Returns :
void
|
Public performTargetObjectBindingUpdate | |||||||||
performTargetObjectBindingUpdate(dependencyProperty: DependencyProperty, binding: Binding)
|
|||||||||
Inherited from
DependencyObject
|
|||||||||
Defined in
DependencyObject:429
|
|||||||||
Updates the target object value associated to the binding.
Parameters :
Returns :
void
|
Private preprocessValue | |||||||||
preprocessValue(property: DependencyProperty, value: any)
|
|||||||||
Inherited from
DependencyObject
|
|||||||||
Defined in
DependencyObject:889
|
|||||||||
Preprocess value to be set to dependency property
Parameters :
Returns :
any
|
Private recreateSubscriptionsForMultiPropertyBindingPath | ||||||||||||||||||||||||
recreateSubscriptionsForMultiPropertyBindingPath(currentContext: any, outerContext: any, properties: string[], propertyIndex: number, dependencyProperty: DependencyProperty, bindingExpression: BindingExpression, subscriptionsForCurrentBindingPath: Array<>)
|
||||||||||||||||||||||||
Inherited from
DependencyObject
|
||||||||||||||||||||||||
Defined in
DependencyObject:682
|
||||||||||||||||||||||||
Parameters :
Returns :
void
|
Private registerSetPropertyIfRequired | ||||||
registerSetPropertyIfRequired(name: string)
|
||||||
Inherited from
DependencyObject
|
||||||
Defined in
DependencyObject:903
|
||||||
Register set property if required
Parameters :
Returns :
void
|
Private removeSubscriptionsForMultiPropertyBindingPath | |||||||||
removeSubscriptionsForMultiPropertyBindingPath(subscriptionsForCurrentBindingPath: [], propertyIndex: number)
|
|||||||||
Inherited from
DependencyObject
|
|||||||||
Defined in
DependencyObject:663
|
|||||||||
Parameters :
Returns :
void
|
removeValidationMessage | ||||||
removeValidationMessage(propKey: Binding | string)
|
||||||
Inherited from
DependencyObject
|
||||||
Defined in
DependencyObject:158
|
||||||
Removes a validation message associated to a binding or a property name
Parameters :
Returns :
void
|
SetBinding | ||||||||||||
SetBinding(dependencyProperty: DependencyProperty, binding: Binding)
|
||||||||||||
Inherited from
DependencyObject
|
||||||||||||
Defined in
DependencyObject:317
|
||||||||||||
Sets a binding to the specified property at runtime
Parameters :
Returns :
void
|
Public setValue | |||||||||
setValue(property: DependencyProperty, value: any)
|
|||||||||
Inherited from
DependencyObject
|
|||||||||
Defined in
DependencyObject:249
|
|||||||||
Sets the value for a dependency property
Parameters :
Returns :
void
|
Public setValueForScopedRegion | ||||||||||||
setValueForScopedRegion(property: DependencyProperty, value: any, scopedRegionManager: IRegionManager)
|
||||||||||||
Inherited from
DependencyObject
|
||||||||||||
Defined in
DependencyObject:282
|
||||||||||||
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 :
Returns :
void
|
Protected shouldPreventDefaultSourceUpdate | |||||||||
shouldPreventDefaultSourceUpdate(dependencyProperty: DependencyProperty, binding: BindingExpression)
|
|||||||||
Inherited from
DependencyObject
|
|||||||||
Defined in
DependencyObject:870
|
|||||||||
Parameters :
Returns :
boolean
|
Private subscribeToBindingPathChanges | |||||||||||||||
subscribeToBindingPathChanges(context: any, binding: Binding, dependencyProperty: DependencyProperty, bindingExpression: BindingExpression)
|
|||||||||||||||
Inherited from
DependencyObject
|
|||||||||||||||
Defined in
DependencyObject:512
|
|||||||||||||||
Parameters :
Returns :
void
|
Private subscribeToErrorsChangedInModel | ||||||||||||
subscribeToErrorsChangedInModel(errorCtxt: INotifyDataErrorInfo, propertyToSubscribe: string, bindingExpression: BindingExpression)
|
||||||||||||
Inherited from
DependencyObject
|
||||||||||||
Defined in
DependencyObject:748
|
||||||||||||
Parameters :
Returns :
void
|
Private subscribeToPropertyChanges | ||||||||||||||||||||||||
subscribeToPropertyChanges(currentContext: any, outerContext: any, properties: string[], propertyIndex: number, dependencyProperty: DependencyProperty, bindingExpression: BindingExpression, subscriptionsForCurrentBindingPath: Array<>)
|
||||||||||||||||||||||||
Inherited from
DependencyObject
|
||||||||||||||||||||||||
Defined in
DependencyObject:586
|
||||||||||||||||||||||||
Parameters :
Returns :
void
|
Private updateSourceOfBinding | ||||||||||||
updateSourceOfBinding(binding: Binding, outerContext: any, dependencyProperty: DependencyProperty)
|
||||||||||||
Inherited from
DependencyObject
|
||||||||||||
Defined in
DependencyObject:811
|
||||||||||||
Updates the source of a binding
Parameters :
Returns :
void
|
Visibility | ||||||
getVisibility()
|
||||||
setVisibility(value: boolean)
|
||||||
Gets or sets the visibility of the control
Parameters :
Returns :
void
|
HasAutoColumnGridParent | ||||
getHasAutoColumnGridParent()
|
||||
Gets the autoColumnGridParent flag |
||||
setHasAutoColumnGridParent(value)
|
||||
Sets the autoColumnGridParent flag
Parameters :
Returns :
void
|
CustomCSSClasses | ||||
getCustomCSSClasses()
|
||||
Gets the custom CSS Classes property |
||||
setCustomCSSClasses(value)
|
||||
Sets the custom CSS Classes property
Parameters :
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']);
}
}
}