public static void SetAdvanceTooltip(FrameworkElement element, AdvanceTooltip value) { if (value != null && value is AdvanceTooltip && GetAdvanceTooltip(element) == null) { (value as AdvanceTooltip).SetTargetElement(element); } element.SetValue(AdvanceTooltipProperty, value); }
static void IsOpenProperty_Changed(DependencyObject obj, DependencyPropertyChangedEventArgs args) { AdvanceTooltip tooltip = obj as AdvanceTooltip; if (tooltip != null && tooltip.m_popup != null) { if ((bool)args.NewValue) { tooltip.OpenPopup(); } else { tooltip.ClosePopup(); } } }