CascadingPropertyAttribute.cs
using System;

namespace BetterUI;

/// <summary>
/// A property with this attribute will be automatically passed to any child panel that has a property with the same name and type.
/// </summary>
/// <remarks>
/// Useful for passing down theme information, or other settings that should be inheritable.
/// </remarks>
[AttributeUsage( AttributeTargets.Property )]
public sealed class CascadingPropertyAttribute( string? name = null ) : Attribute
{
	/// <summary>
	/// The name of the property to set. If null, will use the name of the property this attribute is applied to.
	/// </summary>
	public string? Name { get; } = name;
}