Class Container
Definition
- Namespace:
- Tizen.NUI
- Assembly:
- Tizen.NUI.dll
- API Level:
- 4
The Container is an abstract class to be inherited from by classes that desire to have views added to them.
C#Copypublic abstract class Container : Animatable, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable, IResourcesProvider
- Inheritance
- Derived
- Implements
Fields
Declaration
C#Copypublic static readonly BindableProperty XamlStyleProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Properties
Declaration
C#Copypublic uint ChildCount { get; }
Property Value
Type | Description |
---|---|
UInt32 | The number of children. |
API Level: 4
Precondition: The container has been initialized.
Declaration
C#Copypublic List<View> Children { get; }
Property Value
Type | Description |
---|---|
List<View> |
API Level: 4
Declaration
C#Copypublic Container Parent { get; }
Property Value
Type | Description |
---|---|
Container | The parent container. |
API Level: 4
Precondition: The child container has been initialized.
Declaration
C#Copypublic ResourceDictionary XamlResources { get; set; }
Property Value
Type | Description |
---|---|
ResourceDictionary |
Declaration
C#Copypublic XamlStyle XamlStyle { get; set; }
Property Value
Type | Description |
---|---|
XamlStyle |
Methods
Declaration
C#Copypublic abstract void Add(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view to add. |
Remarks
If the child already has a parent, it will be removed from the old parent and reparented to this view. This may change child's position, color, scale, etc. as it now inherits them from this view.
API Level: 4
Precondition: This Container (the parent) has been initialized. The child view has been initialized. The child view is not the same as the parent view.
Postcondition: The child will be referenced by its parent. This means that the child will be kept alive, even if the handle passed into this method is reset or destroyed.
CopyAndKeepXNameInstance(Container)
Copy all properties, bindings. Copy children without xName from other container, copy all properties, bindings of children with xName.
Declaration
C#Copypublic void CopyAndKeepXNameInstance(Container other)
Parameters
Type | Name | Description |
---|---|---|
Container | other |
DisposeRecursively()
Dispose itself and all children recursively. We can call this even itself is disposed.
Declaration
C#Copypublic void DisposeRecursively()
Remarks
Note that Container.DisposeIncludeChildren() disposed only if it created by xaml.
Declaration
C#Copypublic abstract View GetChildAt(uint index)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | index | The index of the child to retrieve. |
Returns
Type | Description |
---|---|
View | The view for the given index or empty handle if children are not initialized. |
API Level: 4
Precondition: The view has been initialized.
Declaration
C#Copypublic abstract UInt32 GetChildCount()
Returns
Type | Description |
---|---|
UInt32 | The number of children. |
API Level: 4
Precondition: The container has been initialized.
Declaration
C#Copypublic abstract Container GetParent()
Returns
Type | Description |
---|---|
Container | The parent container. |
API Level: 4
Precondition: The child container has been initialized.
OnBindingContextChanged()
Invoked whenever the binding context of the element changes. Implement this method to add class handling for this event.
Declaration
C#Copyprotected override void OnBindingContextChanged()
Overrides
Remove(View)
Removes a child view from this view. If the view was not a child of this view, this is a no-op.
Declaration
C#Copypublic abstract void Remove(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The view to remove |
API Level: 4
Precondition: This View(the parent) has been initialized. The child view is not the same as the parent view.
Explicit Interface Implementations
Declaration
C#Copybool IResourcesProvider.IsResourcesCreated { get; }
Returns
Type | Description |
---|---|
Boolean |