NavigationView.ContainerFromMenuItem(Object) 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 corresponding to the specified menu item.
Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.NavigationView.ContainerFromMenuItem(Object) (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).
public:
virtual DependencyObject ^ ContainerFromMenuItem(Platform::Object ^ item) = ContainerFromMenuItem;
DependencyObject ContainerFromMenuItem(IInspectable const& item);
public DependencyObject ContainerFromMenuItem(object item);
function containerFromMenuItem(item)
Public Function ContainerFromMenuItem (item As Object) As DependencyObject
Parameters
- item
-
Object
Platform::Object
IInspectable
The menu item to retrieve the container for.
Returns
A container that corresponds to the specified menu item, if the item has a container and exists in the collection; otherwise, null.