Popup class
이 콘텐츠는 아직 번역되지 않았습니다.
Hosts arbitrary content in a popup surface anchored to a rectangle in the owner window. The popup draws nothing of its own, so the content carries its own frame, and it never moves the keyboard focus, so the owner keeps driving the input. Use PopupOwnerBase instead for a control that is itself the trigger and wants the focus to follow into the popup.
Guide: C# Markup reference: Content
public class Popup : FrameworkElement, ILogicalTreeHost, IVisualTreeHostPublic Members
Section titled “Public Members”| name | description |
|---|---|
| Popup() | The default constructor. |
| Content { get; set; } | Gets or sets the element shown in the popup surface. |
| IsOpen { get; } | Whether the popup is currently on screen. A read-only property so a trigger can bind its own state to it or a style can key off it, while opening stays a call. |
| StaysOpen { get; set; } | Gets or sets whether the popup survives an outside press and a focus change, read when it opens; only its owner leaving the visual tree or Close then takes it down. |
| event Closed | Occurs after the popup closes, with why it closed. |
| event Opened | Occurs after the popup opens. |
| Close() | Closes the popup. Closing a closed popup is harmless. |
| MoveTo(…) | Moves an open popup to a new anchor and returns its new bounds. Does nothing while closed, which is what lets a caller track a moving anchor without testing IsOpen first. |
| ShowAt(…) | Opens the popup against anchorInWindow, expressed in the owner window’s coordinates, and returns the bounds it was placed at. Returns an empty rectangle when owner is not in a window or the popup has no content. |
| static readonly ContentProperty | |
| static readonly IsOpenProperty | |
| static readonly StaysOpenProperty |
See Also
Section titled “See Also”- class FrameworkElement
- interface ILogicalTreeHost
- interface IVisualTreeHost
- namespace Aprillz.MewUI.Controls