Task<T> as result type

This commit is contained in:
2025-11-12 10:52:17 +01:00
parent efebfc3c9d
commit 14d8e83a64
2 changed files with 4 additions and 4 deletions

View File

@@ -11,17 +11,17 @@ public partial class AvaloniaFlyoutBase
public static IImage? DefaultConfirmImage { get; set; } public static IImage? DefaultConfirmImage { get; set; }
public static int DefaultPadding { get; set; } = 3; public static int DefaultPadding { get; set; } = 3;
public static Task Show<T>(ContentControl owner, object? tag = null) where T : AvaloniaFlyoutBase public static Task<T> Show<T>(ContentControl owner, object? tag = null) where T : AvaloniaFlyoutBase
{ {
return Show(CreatePanelInstance<T>(tag), owner); return Show(CreatePanelInstance<T>(tag), owner);
} }
public static Task Show<T>(ContentControl owner, string? title, IImage? icon, object? tag = null) where T : AvaloniaFlyoutBase public static Task<T> Show<T>(ContentControl owner, string? title, IImage? icon, object? tag = null) where T : AvaloniaFlyoutBase
{ {
return Show(CreatePanelInstance<T>(tag), owner, title, icon); return Show(CreatePanelInstance<T>(tag), owner, title, icon);
} }
public static Task Show<T>(T content, ContentControl owner, string? title, IImage? icon) where T : AvaloniaFlyoutBase public static Task<T> Show<T>(T content, ContentControl owner, string? title, IImage? icon) where T : AvaloniaFlyoutBase
{ {
if (!string.IsNullOrWhiteSpace(title)) if (!string.IsNullOrWhiteSpace(title))
content.Title = title; content.Title = title;

View File

@@ -7,7 +7,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Version>1.2.7</Version> <Version>1.2.8</Version>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>