Multi-Platform Package Manager for Stable Diffusion
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
417 B

using Avalonia.Input;
namespace StabilityMatrix.Avalonia.Extensions;
public static class DataObjectExtensions
{
/// <summary>
/// Get Context from IDataObject, set by Xaml Behaviors
/// </summary>
public static T? GetContext<T>(this IDataObject dataObject)
{
if (dataObject.Get("Context") is T context)
{
return context;
}
return default;
}
}