ItemsControl.ContainerFromElement Method

Definition

Devuelve el contenedor que pertenece al ItemsControl actual que posee el elemento contenedor determinado.Returns the container that belongs to the current ItemsControl that owns the given container element.

Overloads

ContainerFromElement(DependencyObject)

Devuelve el contenedor que pertenece al ItemsControl actual que posee el elemento determinado.Returns the container that belongs to the current ItemsControl that owns the given element.

ContainerFromElement(ItemsControl, DependencyObject)

Devuelve el contenedor que pertenece al elemento ItemsControl especificado que posee el elemento contenedor determinado.Returns the container that belongs to the specified ItemsControl that owns the given container element.

ContainerFromElement(DependencyObject)

Devuelve el contenedor que pertenece al ItemsControl actual que posee el elemento determinado.Returns the container that belongs to the current ItemsControl that owns the given element.

public:
 System::Windows::DependencyObject ^ ContainerFromElement(System::Windows::DependencyObject ^ element);
public System.Windows.DependencyObject ContainerFromElement (System.Windows.DependencyObject element);
member this.ContainerFromElement : System.Windows.DependencyObject -> System.Windows.DependencyObject
Public Function ContainerFromElement (element As DependencyObject) As DependencyObject

Parameters

element
DependencyObject

Elemento para el que se va a devolver el contenedor.The element to return the container for.

Returns

DependencyObject

Contenedor que pertenece al ItemsControl actual que posee el elemento determinado o null si no existe ese contenedor.The container that belongs to the current ItemsControl that owns the given element or null if no such container exists.

See also

ContainerFromElement(ItemsControl, DependencyObject)

Devuelve el contenedor que pertenece al elemento ItemsControl especificado que posee el elemento contenedor determinado.Returns the container that belongs to the specified ItemsControl that owns the given container element.

public:
 static System::Windows::DependencyObject ^ ContainerFromElement(System::Windows::Controls::ItemsControl ^ itemsControl, System::Windows::DependencyObject ^ element);
public static System.Windows.DependencyObject ContainerFromElement (System.Windows.Controls.ItemsControl itemsControl, System.Windows.DependencyObject element);
static member ContainerFromElement : System.Windows.Controls.ItemsControl * System.Windows.DependencyObject -> System.Windows.DependencyObject
Public Shared Function ContainerFromElement (itemsControl As ItemsControl, element As DependencyObject) As DependencyObject

Parameters

itemsControl
ItemsControl

Elemento ItemsControl para el que se devolverá el contenedor.The ItemsControl to return the container for.

element
DependencyObject

Elemento para el que se va a devolver el contenedor.The element to return the container for.

Returns

DependencyObject

Contenedor que pertenece al elemento ItemsControl especificado que posee el elemento contenedor determinado, si itemsControl no es null.The container that belongs to the specified ItemsControl that owns the given element, if itemsControl is not null. Si itemsControl es null, devuelve el contenedor más cercano que pertenezca a cualquier elemento ItemsControl.If itemsControl is null, returns the closest container that belongs to any ItemsControl.

See also

Applies to