projects/wms-framework/src/lib/basecomponentmodel/UIElementCollectionModel.ts
UIElementCollectionModel class
PresentationFrameworkCollectionModel
constructor(parent?: any)
|
||||||
Parameters :
|
Private innerCollection |
Default value : new SimpleList<T>()
|
Inherited from
PresentationFrameworkCollectionModel
|
Defined in
PresentationFrameworkCollectionModel:446
|
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 add | ||||
add(obj)
|
||||
Inherited from
PresentationFrameworkCollectionModel
|
||||
Defined in
PresentationFrameworkCollectionModel:40
|
||||
Utility add method that helps building hierarchy for the VisualTreeHelperClass
Parameters :
Returns :
void
|
Public clear |
clear()
|
Inherited from
PresentationFrameworkCollectionModel
|
Defined in
PresentationFrameworkCollectionModel:72
|
Utility clear method that helps building hierarchy for the VisualTreeHelperClass
Returns :
void
|
Public insert |
insert(index: number, value: UIElement)
|
Inherited from
PresentationFrameworkCollectionModel
|
Defined in
PresentationFrameworkCollectionModel:52
|
Utility insert method that helps building hierarchy for the VisualTreeHelperClass
Returns :
void
|
Public remove | ||||
remove(obj)
|
||||
Inherited from
PresentationFrameworkCollectionModel
|
||||
Defined in
PresentationFrameworkCollectionModel:63
|
||||
Utility remove method that helps building hierarchy for the VisualTreeHelperClass
Parameters :
Returns :
any
|
Public removeAt | ||||||
removeAt(index: number)
|
||||||
Inherited from
PresentationFrameworkCollectionModel
|
||||||
Defined in
PresentationFrameworkCollectionModel:86
|
||||||
Utility removeAt method that helps building hierarchy for the VisualTreeHelperClass
Parameters :
Returns :
void
|
Public setItem |
setItem(index: number, value: UIElement)
|
Inherited from
PresentationFrameworkCollectionModel
|
Defined in
PresentationFrameworkCollectionModel:99
|
Utility setItem method that helps building hierarchy for the VisualTreeHelperClass
Returns :
void
|
contains | ||||||
contains(value: T)
|
||||||
Inherited from
PresentationFrameworkCollectionModel
|
||||||
Defined in
PresentationFrameworkCollectionModel:513
|
||||||
Parameters :
Returns :
boolean
|
copyTo | |||||||||
copyTo(target: T[], index: number)
|
|||||||||
Inherited from
PresentationFrameworkCollectionModel
|
|||||||||
Defined in
PresentationFrameworkCollectionModel:523
|
|||||||||
Parameters :
Returns :
void
|
getItem | ||||||
getItem(index: number)
|
||||||
Inherited from
PresentationFrameworkCollectionModel
|
||||||
Defined in
PresentationFrameworkCollectionModel:447
|
||||||
Parameters :
Returns :
T
|
indexOf | ||||||
indexOf(value: T)
|
||||||
Inherited from
PresentationFrameworkCollectionModel
|
||||||
Defined in
PresentationFrameworkCollectionModel:456
|
||||||
Parameters :
Returns :
number
|
internalAdd | ||||||
internalAdd(value: T)
|
||||||
Inherited from
PresentationFrameworkCollectionModel
|
||||||
Defined in
PresentationFrameworkCollectionModel:492
|
||||||
Add used for internal processing of added elements to collection without trigger change
Parameters :
Returns :
void
|
sort |
sort()
|
Inherited from
PresentationFrameworkCollectionModel
|
Defined in
PresentationFrameworkCollectionModel:473
|
Returns :
any
|
()
|
Inherited from
PresentationFrameworkCollectionModel
|
Defined in
PresentationFrameworkCollectionModel:526
|
Returns :
Iterator<T, any, undefined>
|
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
|
import { UIElement } from './UIElement';
import { PresentationFrameworkCollectionModel } from '../models/controls/ItemsControlModel';
import { FrameworkElement } from './FrameworkElement';
/**
* UIElementCollectionModel class
*
* @export
* @class UIElementCollectionModel
* @extends {PresentationFrameworkCollectionModel<UIElement>}
* @wType System.Windows.Controls.UIElementCollection
*/
export class UIElementCollectionModel extends PresentationFrameworkCollectionModel<UIElement> {
constructor(private parent?: any) {
super();
}
/**
* Utility add method that helps building hierarchy for the VisualTreeHelperClass
*
* @param {*} obj
* @memberof UIElementCollectionModel
*/
public add(obj) {
this.parent.addChild(obj);
super.add(obj);
}
/**
* Utility insert method that helps building hierarchy for the VisualTreeHelperClass
*
* @param {number} index
* @param {*} obj
* @memberof UIElementCollectionModel
*/
public insert(index: number, value: UIElement) {
this.parent.addChild(value);
super.insert(index, value);
}
/**
* Utility remove method that helps building hierarchy for the VisualTreeHelperClass
*
* @param {*} obj
* @memberof UIElementCollectionModel
*/
public remove(obj) {
this.parent.removeChild(obj);
return super.remove(obj);
}
/**
* Utility clear method that helps building hierarchy for the VisualTreeHelperClass
*
*/
public clear() {
for (let item of this.internalArray) {
if (item instanceof FrameworkElement) {
this.parent.removeChild(item);
}
}
super.clear();
}
/**
* Utility removeAt method that helps building hierarchy for the VisualTreeHelperClass
*
* @param {number} index
*/
public removeAt(index: number) {
if (!(index >= this.internalArray.length || index < 0)) {
this.parent.removeChild(this.internalArray[index]);
}
super.removeAt(index);
}
/**
* Utility setItem method that helps building hierarchy for the VisualTreeHelperClass
*
* @param {number} index
* @param {UIElement} value
*/
public setItem(index: number, value: UIElement) {
if (!(index >= this.internalArray.length || index < 0)) {
this.parent.removeChild(this.internalArray[index]);
this.parent.addChild(value);
}
super.setItem(index, value);
}
}