ItemsControl.ContainerFromElement Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the container that belongs to the current ItemsControl that owns the given container element.
Overloads
ContainerFromElement(DependencyObject) |
Returns the container that belongs to the current ItemsControl that owns the given element. |
ContainerFromElement(ItemsControl, DependencyObject) |
Returns the container that belongs to the specified ItemsControl that owns the given container element. |
ContainerFromElement(DependencyObject)
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
The element to return the container for.
Returns
The container that belongs to the current ItemsControl that owns the given element or null
if no such container exists.
See also
Applies to
ContainerFromElement(ItemsControl, DependencyObject)
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
The ItemsControl to return the container for.
- element
- DependencyObject
The element to return the container for.
Returns
The container that belongs to the specified ItemsControl that owns the given element, if itemsControl
is not null
. If itemsControl
is null
, returns the closest container that belongs to any ItemsControl.
See also
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기