Flyout
A popup surface anchored to another component that opens/closes on interaction and hosts arbitrary content.
Its panel is a dialog a screen reader names by what opened it — the anchor's button and its words — unless AccessibleName names it otherwise.
new FlyoutComponent("flyout")
Properties
| Property | Type | Default | Binding | Description |
|---|---|---|---|---|
IsOpenSetIsOpen · BindIsOpen | bool? | false | two-way | Whether the flyout is open; two-way, so an anchor click, an outside click or Escape syncs back. |
CloseOnBackdropSetCloseOnBackdrop · BindCloseOnBackdrop | bool? | true | one-way | Whether clicking outside the flyout closes it. |
CloseOnEscapeSetCloseOnEscape · BindCloseOnEscape | bool? | true | one-way | Whether pressing Escape closes the flyout. |
PopupPlacementSetPopupPlacement · BindPopupPlacement | UIPopupPlacement? | UIPopupPlacement.BottomStart | one-way | Where the popup opens against its anchor, flipping where there is no room; below from its start unless the component says otherwise. Read each time the popup opens. |
AccessibleNameSetAccessibleName · BindAccessibleName | UIPhrase | null | one-way | The name a screen reader announces in place of the visible words; unset, the control is named by what it shows. The set is a wrapper's hand (a labelled control is named by its label), an author's own words said at the component. translatable |
Events
OnOpen(string command)- Registers a command to invoke when the flyout is opened.
OnOpen(string command, params KeyValuePair<string, UIActionArgument>[] arguments)- Registers a command with bound arguments to invoke when the flyout is opened.
OnOpenLiteral(string command, params KeyValuePair<string, object>[] arguments)- Registers a command with literal arguments to invoke when the flyout is opened.
OnClose(string command)- Registers a command to invoke when the flyout is closed.
OnClose(string command, params KeyValuePair<string, UIActionArgument>[] arguments)- Registers a command with bound arguments to invoke when the flyout is closed.
OnCloseLiteral(string command, params KeyValuePair<string, object>[] arguments)- Registers a command with literal arguments to invoke when the flyout is closed.
Methods
SetAnchor(IVisualComponent component)- Sets the anchor region the flyout is positioned relative to.
SetContent(IVisualComponent component)- Sets the content region shown inside the flyout.
Open()- Sets
FlyoutComponent.IsOpentotrue. Close()- Sets
FlyoutComponent.IsOpentofalse. ConfigureTemplate(TTemplate? current, Action<TTemplate> configure, string what)- Configures
currentwhen it is aTTemplate, throwing when a different one was set.
Common properties (23) — layout, visibility, theme, and the rest every component shares
| Property | Type | Default | Binding | Description |
|---|---|---|---|---|
VisibilitySetVisibility · BindVisibility | UIResponsive<UIVisibility>? | Visible | one-way | What the component does with the room it was given, optionally overridden per breakpoint (e.g. collapsed from a given width up). Hidden at every width — by a static value or a controller binding — the server refuses a command or a value the component or anything inside it sends. That is a guard against a stale or forged page, not the permission itself: an interaction that hides it ( HiddenWhen) lives on the client alone, so who may act belongs in the command or the setter. |
EnabledSetEnabled · BindEnabled | bool? | true | one-way | Whether the component responds to input; false dims it and marks it, and its subtree, inert. False by a static value or a controller binding, the server refuses a command or a value the component or anything inside it sends. That is a guard against a stale or forged page, not the permission itself: an interaction that disables it ( EnabledWhen) lives on the client alone, so who may act belongs in the command or the setter. |
ThemeSetTheme · BindTheme | UIThemeMode? | null | one-way | The theme mode forced on this component's subtree, or null to inherit the ambient theme. |
HorizontalAlignmentSetHorizontalAlignment · BindHorizontalAlignment | UIResponsive<UIAlignment>? | Stretch | one-way | Where the component sits within its grid cell along the horizontal axis, optionally overridden per breakpoint. |
VerticalAlignmentSetVerticalAlignment · BindVerticalAlignment | UIResponsive<UIAlignment>? | Stretch | one-way | Where the component sits within its grid cell along the vertical axis, optionally overridden per breakpoint. |
WidthSetWidth · BindWidth | UIResponsive<UILayoutLength>? | null | one-way | The component width, optionally overridden per breakpoint. |
MinWidthSetMinWidth · BindMinWidth | UIResponsive<UILayoutLength>? | null | one-way | The component minimum width, optionally overridden per breakpoint. |
MaxWidthSetMaxWidth · BindMaxWidth | UIResponsive<UILayoutLength>? | null | one-way | The component maximum width, optionally overridden per breakpoint. |
HeightSetHeight · BindHeight | UIResponsive<UILayoutLength>? | null | one-way | The component height, optionally overridden per breakpoint. |
MinHeightSetMinHeight · BindMinHeight | UIResponsive<UILayoutLength>? | null | one-way | The component minimum height, optionally overridden per breakpoint. |
MaxHeightSetMaxHeight · BindMaxHeight | UIResponsive<UILayoutLength>? | null | one-way | The component maximum height, optionally overridden per breakpoint. |
ZIndexSetZIndex · BindZIndex | int? | 0 | one-way | The stacking order within the visual tree. |
MarginSetMargin · BindMargin | UIResponsive<UIThickness>? | null | one-way | The outer spacing around the component, optionally overridden per breakpoint. |
PlacementSetPlacement · BindPlacement | UIResponsive<UIGridPlacement>? | null | one-way | The grid placement, optionally overridden per breakpoint. |
AlignWithFieldBoxesSetAlignWithFieldBoxes | UIResponsive<UIFieldBoxAlignment>? | null | — | Whether the component stands level with the boxes of captioned fields beside it — a caption line down, centred on the box — and on which boxes, per breakpoint. Unset, the compiler decides it wherever the component stands side by side with a thing that draws a caption row (UIFieldBoxes); UIFieldBoxAlignment.None keeps it where it is laid out.Render-time only. A panel draws it as its top padding and its least height, anything else as its top margin, set down onto the band's middle; an authored Padding, MinHeight or Margin replaces them. |
LoadingSetLoading · BindLoading | bool? | false | one-way | Whether the component is in loading state — a live state a controller turns on and off. While it holds, by a static value or a controller binding, the server refuses a command or a value the component or anything inside it sends — as the page does. |
LoadingStyleSetLoadingStyle · BindLoadingStyle | UILoadingStyle? | null | one-way | The visual indicator shown while this component or spinner is loading, or null to inherit the ambient or theme loading style. |
ShowContextMenuSetShowContextMenu · BindShowContextMenu | bool? | true | one-way | Whether a right-click opens the IVisualComponent.ContextMenu; on a host with rows, whether it opens any row's. Off, the menu stays in the tree and nothing opens it. |
ActionBarSetActionBar | UIActionBarAlignment? | null | — | How the component's action bar lines up with it, or null for none: the IVisualComponent.ContextMenu's entries marked for the bar (a menu item's InActionBar) as icons, and "more" opening the menu itself, floating above the component once the reader chooses it — a press, a tap, the keyboard's cursor — until a press elsewhere, Escape, or another chosen.A quick view of the menu, not a second list: a press on an icon is that entry's press. Render-time only; a component with an action bar and no context menu is refused when the view compiles. |
ActionBarRepeatInMoreSetActionBarRepeatInMore | bool? | true | — | Whether the menu the IVisualComponent.ActionBar's "more" opens repeats the entries the bar shows (the default), or holds the rest alone — no caption or rule left with nothing to stand over or between. A right-click and a long press open the whole menu either way, and a bar whose menu holds nothing more draws no "more".Render-time only. |
ScrollGroupSetScrollGroup · BindScrollGroup | string | null | one-way | The scroll group this component belongs to: every component sharing the name scrolls together. Driven by whichever one the reader scrolls. Components that mark their shown source lines (e.g. a code field and a Markdown display) sync line-for-line; otherwise by scroll fraction. |
TextSelectableSetTextSelectable · BindTextSelectable | bool? | null | one-way | Whether the reader can select the words in this component and everything inside it: true lets them (a table whose cells are copied, a chat bubble), false keeps them out; unset, the place decides — a Text's and a Paragraph's words and a validation message select, unless they stand in a row, a menu or another control, and nothing else does. The nearest component that says wins. A control's own words (a button's label, a tab, a menu entry, a field's caption), a surface the pointer drags (a row that drags by itself, a canvas, a grip) and, on a touch screen, anything a long press opens a menu on never select; a field's value always does. |
WindowFootSetWindowFoot | bool? | null | — | Whether this component is the window's foot (a chat's composer, a pane's last row): where it stands at the window's bottom edge the phone's system bar takes its background colour, dimmed by any open modal drawer or dialog veil, and its content sits above the bar. The page's bottom bar is one by itself. Render-time only. |