PopupHandler ClassDW.WPFToolkit Documentation
This objects help to determine when a popup has to be closed. This can be by clicking somewhere else, clicking in the title bar or moving the window.
Inheritance Hierarchy

SystemObject
  DW.WPFToolkit.HelpersPopupHandler

Namespace: DW.WPFToolkit.Helpers
Assembly: DW.WPFToolkit (in DW.WPFToolkit.dll) Version: 5.6.0.0
Syntax

C#
public class PopupHandler

The PopupHandler type exposes the following members.

Constructors

  NameDescription
Public methodPopupHandler
Initializes a new instance of the PopupHandler class
Top
Methods

  NameDescription
Public methodAutoClose
Starts an observing of the window which contains the control to determine when the item has to be closed.
Top
Examples

C#
public class Control : ContentControl
{
    private PopupHandler _popupHandler;

    public override void OnApplyTemplate()
    {
        var popup = GetTemplateChild("PART_Popup") as Popup;
        if (popup == null)
            return;

        _popupHandler = new PopupHandler();
        _popupHandler.AutoClose(popup, OnPopupClosed);
    }

    private void OnPopupClosed()
    {
    }
}
See Also

Reference