![]() ContentTemplate, ContentTemplateSelector, ContentStringFormat - How the content should be displayed (inherited from ContentControl). ![]() Content - What is to be displayed in the popup.For Center alignment, popup will stop growing when it hits screen boundary that is closer to popup center. If you set ClipToScreen on PrecisePopupPlacement, PrecisePopup will stop growing when it reaches screen boundary. Center alignment causes it to grow equally in both directions. For example, setting HorizontalPopupAlignment to Left causes the popup to grow to the right. Notice that the popup always grows in some direction to accommodate its content. It is possible to limit popup size to screen bounds without moving the popup. PrecisePopup auto-sizes to fit its contents. This allows you to define several layouts for your popup depending on where the popup is opened. If no one fits fully, PrecisePopupPlacement will select the one that has least area clipped behind screen edges. It will select the first PrecisePopupPlacement that fits on screen. The only thing that PrecisePopup does is to select one PrecisePopupPlacement from the list of possible alternatives. If the popup happens to fall off the screen, so be it. PrecisePopup never adjusts position specified in PrecisePopupPlacement. Each PrecisePopupPlacement specifies location of popup relative to placement target. PrecisePopup is configured with one or more PrecisePopupPlacement instances. Some details have been omitted for brevity. One of four possible placements is chosen to keep the popup fully visible.īelow you can see how the PrecisePopup was configured to yield the above behavior. Instead of sliding the popup to the left like the built-in Popup does, PrecisePopup selected another placement (bottom-left) from its discrete list of allowed placements. The window was moved so that default bottom-right placement would be obscured by taskbar. PrecisePopup, part of my opensource JungleControls library,īelow you can see PrecisePopup in action. This is okay for usual rectangular popups, but it's a headache for authors of "eared" or balloon popups that have tabpage-like ear or pointed anchor. If the popup doesn't fit in the screen when positioned as specified, Popup control will automatically move it to ensure the whole popup is visible. ![]() The trouble begins when your placement target is close to the edge of the screen. Popup in WPF of course allows you to select one of the predefined locations relative to placement target. Reason: JungleControls library is no longer maintained. Information presented on this page might be out of date. PrecisePopup is a smart popup for WPF that can open in multiple relative positions depending on how much space there is around it on the screen. Robert Važan Anchor WPF Popup exactly where you need it with PrecisePopup
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |