public static void ClearLocalValues(FrameworkElement itemsPresenter, Popup popup) { if (itemsPresenter != null) { itemsPresenter.ClearValue(FrameworkElement.HeightProperty); itemsPresenter.ClearValue(FrameworkElement.WidthProperty); } if (popup != null) { popup.ClearValue(Popup.PlacementProperty); popup.ClearValue(Popup.VerticalOffsetProperty); popup.ClearValue(Popup.HorizontalOffsetProperty); } }
public static void RelocatePopup(Popup popup) { popup.ClearValue(Popup.IsOpenProperty); popup.IsOpen = true; }