using Avalonia.Styling; namespace Avalonia.Controls { /// /// Decorator control that isolates controls subtree with locally defined . /// public class ThemeVariantScope : Decorator { /// public static readonly StyledProperty ActualThemeVariantProperty = ThemeVariant.ActualThemeVariantProperty.AddOwner(); /// public static readonly StyledProperty RequestedThemeVariantProperty = ThemeVariant.RequestedThemeVariantProperty.AddOwner(); /// /// Gets or sets the UI theme variant that is used by the control (and its child elements) for resource determination. /// The UI theme you specify with ThemeVariant can override the app-level ThemeVariant. /// /// /// Setting RequestedThemeVariant to will apply parent's actual theme variant on the current scope. /// public ThemeVariant? RequestedThemeVariant { get => GetValue(RequestedThemeVariantProperty); set => SetValue(RequestedThemeVariantProperty, value); } } }