Skip to content

Commit

Permalink
1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
roman committed Oct 24, 2023
1 parent 54fd275 commit 0f9bcd2
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Exmaple2.0/Views/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private async void Standard_Popup_OnClick(object sender, RoutedEventArgs e)
ShowInCenter = true,
Topmost = false
});

var result = await box.ShowAsPopupAsync(this);
}

Expand Down
31 changes: 31 additions & 0 deletions MsBox.Avalonia/Base/IMsBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,41 @@ namespace MsBox.Avalonia.Base;

public interface IMsBox<T>
{
/// <summary>
/// Show messagebox depending on the type of application
/// If application is SingleViewApplicationLifetime (Mobile or Browses) then show messagebox as popup
/// If application is ClassicDesktopStyleApplicationLifetime (Desktop) then show messagebox as window
/// </summary>
/// <returns></returns>
/// <exception cref="NotSupportedException"></exception>
Task<T> ShowAsync();

/// <summary>
/// Show messagebox as window
/// </summary>
/// <returns></returns>
Task<T> ShowWindowAsync();

/// <summary>
/// Show messagebox as window with owner
/// </summary>
/// <param name="owner">Window owner </param>
/// <returns></returns>
Task<T> ShowWindowDialogAsync(Window owner);

/// <summary>
/// Show messagebox as popup
/// </summary>
/// <param name="owner"></param>
/// <returns></returns>
Task<T> ShowAsPopupAsync(ContentControl owner);

/// <summary>
/// Show messagebox as popup with owner
/// </summary>
/// <param name="owner"></param>
/// <returns></returns>
Task<T> ShowAsPopupAsync(Window owner);

string InputValue { get; }
}
2 changes: 1 addition & 1 deletion MsBox.Avalonia/MsBox.Avalonia.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PackageVersion>3.1.5</PackageVersion>
<PackageVersion>3.1.5.1</PackageVersion>
<Title>MessageBox.Avalonia</Title>
<Authors>Lary</Authors>
<Description>Messagebox for AvaloniaUI</Description>
Expand Down

0 comments on commit 0f9bcd2

Please sign in to comment.