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