bool IPopupItem.Contains(DependencyObject target) { return target.VisualHierarchy().Contains(this); }
bool IPopupItem.Contains(DependencyObject target) { var res = target.VisualHierarchy().Contains(this); if (!res && MenuRibbon != null) { res = target.VisualHierarchy().Contains(MenuRibbon); if (MenuRibbon.PinnedRibbonItem == this || MenuRibbon.DroppedRibbonItem == this) { res = target.VisualHierarchy().Contains(MenuRibbon); } } return res; }