/// <summary> /// Handles changes to the PlacementTarget property. /// </summary> /// <param name="d">The d.</param> /// <param name="e">The <see cref="DependencyPropertyChangedEventArgs"/> instance containing the event data.</param> private static void OnPlacementTargetChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { xPopup target = (xPopup)d; UIElement oldPlacementTarget = (UIElement)e.OldValue; UIElement newPlacementTarget = target.PlacementTarget; target.OnPlacementTargetChanged(oldPlacementTarget, newPlacementTarget); }
/// <summary> /// Initializes a new instance of the <see cref="xPopup"/> class. /// </summary> public xPopup() { AdornedElements = new ObservableCollection <UIElement>(); this.IsVisibleChanged += MyPopupControl_IsVisibleChanged; xPopup.ActivePopup = this; }