//private ItemsPresenter _circleMenuItemsPresenter; protected override void OnApplyTemplate() { if (CenterBtn != null) { CenterBtn.Tapped -= centerBtn_Click; } CenterBtn = GetTemplateChild(PartCenterBtn) as Border; Container = GetTemplateChild(PartContainer) as Grid; CircleMenuPanel = GetTemplateChild(PartPanel) as CircleMenuPanel; SetSubMenu(); if (CenterBtn != null) { CenterBtn.Tapped += centerBtn_Click; } base.OnApplyTemplate(); }