Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5740,6 +5740,16 @@
Default is unset. See <seealso cref="P:Microsoft.FluentUI.AspNetCore.Components.FluentPopover.HorizontalPosition"/>
</summary>
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentPopover.VerticalThreshold">
<summary>
How short the space allocated to the default position has to be before the tallest area is selected for layout.
</summary>
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentPopover.HorizontalThreshold">
<summary>
How narrow the space allocated to the default position has to be before the widest area is selected for layout.
</summary>
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentPopover.Open">
<summary>
Gets or sets popover opened state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
Open Callout 2
</FluentButton>

<FluentPopover Style="width: 300px;" AnchorId="myPopoverButtonl" @bind-Open="_visibleL">
<FluentPopover Style="width: 300px;" VerticalThreshold="170" AnchorId="myPopoverButtonl" @bind-Open="_visibleL">
<Header>Callout Header</Header>
<Body>
Callout Body
</Body>
<Footer>Callout Footer</Footer>
</FluentPopover>

<FluentPopover Style="width: 300px;" AnchorId="myPopoverButtonr" @bind-Open="_visibleR">
<FluentPopover Style="width: 300px;" VerticalThreshold="170" AnchorId="myPopoverButtonr" @bind-Open="_visibleR">
<Header>Callout Header</Header>
<Body>
Callout Body
Expand Down
2 changes: 2 additions & 0 deletions src/Core/Components/Popover/FluentPopover.razor
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
HorizontalInset="true"
HorizontalDefaultPosition="@HorizontalPosition"
VerticalDefaultPosition="@VerticalPosition.Bottom"
VerticalThreshold="@VerticalThreshold"
HorizontalThreshold="@HorizontalThreshold"
Shadow="@ElevationShadow.Flyout"
Class="@ClassValue"
Style="@StyleValue">
Expand Down
12 changes: 12 additions & 0 deletions src/Core/Components/Popover/FluentPopover.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ public partial class FluentPopover : FluentComponentBase
[Parameter]
public HorizontalPosition? HorizontalPosition { get; set; } = AspNetCore.Components.HorizontalPosition.Unset;

/// <summary>
/// How short the space allocated to the default position has to be before the tallest area is selected for layout.
/// </summary>
[Parameter]
public int VerticalThreshold { get; set; } = 0;

/// <summary>
/// How narrow the space allocated to the default position has to be before the widest area is selected for layout.
/// </summary>
[Parameter]
public int HorizontalThreshold { get; set; } = 0;

/// <summary>
/// Gets or sets popover opened state.
/// </summary>
Expand Down