NavigationViewItemPresenter GetPresenter() { NavigationViewItemPresenter presenter = null; if (m_navigationViewItemPresenter != null) { presenter = m_navigationViewItemPresenter; } return(presenter); }
protected override void OnApplyTemplate() { // Stop UpdateLocalVisualState before template is applied. Otherwise the visual may not the same as we expect m_appliedTemplate = false; base.OnApplyTemplate(); // Find selection indicator // Retrieve pointers to stable controls m_helper.Init(this); m_navigationViewItemPresenter = GetTemplateChild(c_navigationViewItemPresenterName) as NavigationViewItemPresenter; // m_toolTip = GetTemplateChildT<ToolTip>("ToolTip"sv, controlProtected)); m_appliedTemplate = true; UpdateVisualStateNoTransition(); var visual = ElementCompositionPreview.GetElementVisual(this); NavigationView.CreateAndAttachHeaderAnimation(visual); }