How do I make a WPF popup appear in the lower right corner of an application?

Use PlacementTarget, Placement=Left, Horizontal/VerticalOffset

<Popup IsOpen="{Binding ElementName=togglebutton, Path=IsChecked, Mode=TwoWay}"
       PlacementTarget="{Binding ElementName=togglebutton}"
       Placement="Left"
       HorizontalOffset="{Binding ActualWidth, ElementName=togglebutton}"
       VerticalOffset="{Binding ActualHeight, ElementName=togglebutton}">

I just did something like this, and it's really not that tricky, but it does require custom placement of your popup. When you declare your popup just set the PlacementMode property to Custom, then set the CustomPopupPlacementCallback property to the method you want to use.

this.trayPopup.CustomPopupPlacementCallback = GetPopupPlacement;

private static CustomPopupPlacement[] GetPopupPlacement(Size popupSize, Size targetSize, Point offset)
{
    var point = SystemParameters.WorkArea.BottomRight;
    point.Y = point.Y - popupSize.Height;
    return new[] { new CustomPopupPlacement(point, PopupPrimaryAxis.Horizontal) };
}

Tags:

Wpf