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 @@ -3936,6 +3936,7 @@
left (full height), right (full height)
or screen middle (using Width and Height properties).
HorizontalAlignment.Stretch is not supported for this property.
NOTE: Left/Right only works for Panels, not Dialogs, which are always centered.
</summary>
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.DialogParameters.Title">
Expand Down Expand Up @@ -8532,6 +8533,12 @@
<param name="force">If true, the total item count will be updated even if it is the same as the current value.</param>
<returns></returns>
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentPopover.LibraryConfiguration">
<summary />
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentPopover.JSRuntime">
<summary />
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentPopover.AnchorId">
<summary>
Gets or sets the id of the component the popover is positioned relative to.
Expand Down Expand Up @@ -8610,19 +8617,26 @@
By default, Escape
</summary>
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentPopover.CloseAndTabKeys">
<summary />
</member>
<member name="M:Microsoft.FluentUI.AspNetCore.Components.FluentPopover.OnInitialized">
<summary />
</member>
<member name="M:Microsoft.FluentUI.AspNetCore.Components.FluentPopover.OnParametersSet">
<summary />
</member>
<member name="M:Microsoft.FluentUI.AspNetCore.Components.FluentPopover.CloseAsync">
<member name="M:Microsoft.FluentUI.AspNetCore.Components.FluentPopover.OnAfterRenderAsync(System.Boolean)">
<summary />
</member>
<member name="M:Microsoft.FluentUI.AspNetCore.Components.FluentPopover.CloseOnKeyAsync(Microsoft.FluentUI.AspNetCore.Components.FluentKeyCodeEventArgs)">
<member name="M:Microsoft.FluentUI.AspNetCore.Components.FluentPopover.CloseAsync">
<summary>
Closes the popover. Called from JavaScript keyboard navigation.
</summary>
</member>
<member name="M:Microsoft.FluentUI.AspNetCore.Components.FluentPopover.CloseOverlayAsync">
<summary>
Closes the popover and returns focus to the original element (used by the overlay on outside-click).
</summary>
</member>
<member name="M:Microsoft.FluentUI.AspNetCore.Components.FluentPopover.DisposeAsync">
<summary />
</member>
<member name="T:Microsoft.FluentUI.AspNetCore.Components.FluentPresenceBadge">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
ο»Ώ@inject IDialogService DialogService

<FluentButton @onclick="@OpenSplashCustom" Appearance="Appearance.Accent">
<FluentButton @onclick="@OpenSplashCustomAsync" Appearance="Appearance.Accent">
Open splash screen
</FluentButton>

<FluentButton @onclick="@OpenSplashCustomAsync" Appearance="Appearance.Accent">
Open splash screen (async)
</FluentButton>
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,6 @@ private async Task OpenSplashCustomAsync()
DialogResult result = await _dialog.Result;
await HandleCustomSplashAsync(result);
}
private void OpenSplashCustom()
{
DemoLogger.WriteLine($"Open custom splashscreen for 4 seconds");
DialogParameters<SplashScreenContent> parameters = new()
{
Content = new()
{
Title = "Water drinking 101",
LoadingText = "Filling the re-useable bottles...",
Message = (MarkupString)"Don't drink <strong>too</strong> much water!",
Logo = "_content/FluentUI.Demo.Shared/images/Splash_Corporation_logo.png",
},
Width = "500px",
Height = "300px",
};
DialogService.ShowSplashScreen<CustomSplashScreen>(this, HandleCustomSplashAsync, parameters);
}

private async Task HandleCustomSplashAsync(DialogResult result)
{
await Task.Run(() => DemoLogger.WriteLine($"Custom splash closed"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
ο»Ώ@inject IDialogService DialogService

<FluentButton @onclick="@OpenSplashDefault" Appearance="Appearance.Accent">
Open splash screen
</FluentButton>

<FluentButton @onclick="@OpenSplashDefaultAsync" Appearance="Appearance.Accent">
Open splash screen (async)
Open splash screen
</FluentButton>
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,6 @@ private async Task OpenSplashDefaultAsync()
await HandleDefaultSplashAsync(result);
}

private void OpenSplashDefault()
{
DemoLogger.WriteLine($"Open default SplashScreen for 4 seconds");
DialogParameters<SplashScreenContent> parameters = new()
{
Content = new()
{
Title = "Core components",
SubTitle = "Microsoft Fluent UI Blazor library",
LoadingText = "Loading...",
Message = (MarkupString)"some <i>extra</i> text <strong>here</strong>",
Logo = FluentSplashScreen.LOGO,
},
Width = "640px",
Height = "480px",
Modal = true,
};
DialogService.ShowSplashScreen(this, HandleDefaultSplashAsync, parameters);
}

private async Task HandleDefaultSplashAsync(DialogResult result)
{
await Task.Run(() => DemoLogger.WriteLine($"Default splash closed"));
Expand Down
11 changes: 7 additions & 4 deletions examples/Demo/Shared/Pages/SplashScreen/SplashScreenPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,20 @@
To show a splash screen, the <code>DialogService</code> is used. The <code>DialogService</code> is a singleton service that can be injected
into any page/component. It exposes the following methods to show a splash screen dialog:
<ul>
<li><code>ShowSplashScreen</code> / <code>ShowSplashScreenAsync</code> (uses the <code>FluentSplashScreen</code> to show the dialog)</li>
<li><code>ShowSplashScreenAsync</code> (uses the <code>FluentSplashScreen</code> to show the dialog)</li>
<li>
<code>ShowSplashScreen&lt;T&gt;</code> / <code>ShowSplashScreenAsync&lt;T&gt;</code> where T is a custom component which inherits the <code>FluentSplashScreen</code> component
<code>ShowSplashScreenAsync&lt;T&gt;</code> where T is a custom component which inherits the <code>FluentSplashScreen</code> component
and implements <code>IDialogContentComponent&lt;SplashScreenContent&gt;</code> .</li>
</ul>
</p>
<p>
Internally, the <code>ShowSplashScreen</code> methods call the <code>ShowDialog</code> methods. If is possible to directly call these methods and thereby have
access to all of the parameters. The <code>ShowSplashScreen</code> variants are just convenience methods that make ite easier to work with panels.
Internally, the <code>ShowSplashScreenAsync</code> methods call the <code>ShowDialogAsync</code> methods. If is possible to directly call these methods and thereby have
access to all of the parameters. The <code>ShowSplashScreenAsync</code> variants are just convenience methods that make ite easier to work with panels.
</p>

<FluentMessageBar Title="Warning" Intent="@MessageIntent.Warning">
The <code>DialogService</code>'s synchronous methods are obsoleted and will be removed in the next major version (v5).
</FluentMessageBar>

<h2 id="example">Examples</h2>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public partial class DialogService
/// <param name="receiver">The component that receives the callback</param>
/// <param name="callback">Name of the callback function</param>
/// <param name="parameters"><see cref="SplashScreenContent"/> that holds the content to display</param>
[Obsolete("Use ShowSplashScreenAsync(object, Func, DialogParameters) instead.")]
public void ShowSplashScreen(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters)
=> ShowSplashScreen<FluentSplashScreen>(receiver, callback, parameters);

Expand All @@ -23,6 +24,7 @@ public void ShowSplashScreen(object receiver, Func<DialogResult, Task> callback,
/// <param name="receiver">The component that receives the callback</param>
/// <param name="callback">Name of the callback function</param>
/// <param name="parameters"><see cref="SplashScreenContent"/> that holds the content to display</param>
[Obsolete("Use ShowSplashScreenAsync<T>(object, Func, DialogParameters) instead.")]
public void ShowSplashScreen<T>(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters)
where T : IDialogContentComponent<SplashScreenContent>
=> ShowSplashScreen(typeof(T), receiver, callback, parameters);
Expand All @@ -34,6 +36,7 @@ public void ShowSplashScreen<T>(object receiver, Func<DialogResult, Task> callba
/// <param name="receiver">The component that receives the callback</param>
/// <param name="callback">Name of the callback function</param>
/// <param name="parameters"><see cref="SplashScreenContent"/> that holds the content to display</param>
[Obsolete("Use ShowSplashScreenAsync(Type, object, Func, DialogParameters) instead.")]
public void ShowSplashScreen(Type component, object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters)
{
DialogParameters dialogParameters = new()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ namespace Microsoft.FluentUI.AspNetCore.Components;

public partial interface IDialogService
{
[Obsolete("Use ShowSplashScreenAsync(object, Func, DialogParameters) instead.")]
void ShowSplashScreen(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters);

[Obsolete("Use ShowSplashScreenAsync<T>(object, Func, DialogParameters) instead.")]
void ShowSplashScreen<T>(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters)
where T : IDialogContentComponent<SplashScreenContent>;

[Obsolete("Use ShowSplashScreenAsync(Type, object, Func, DialogParameters) instead.")]
void ShowSplashScreen(Type component, object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters);

Task<IDialogReference> ShowSplashScreenAsync(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters);
Expand Down
Loading