using Avalonia.Controls;
using Avalonia.Metadata;
using Avalonia.Xaml.Interactivity;
namespace Avalonia.Xaml.Interactions.Responsive;
///
/// Conditional class setter used in behavior.
///
public class AdaptiveClassSetter : AvaloniaObject
{
///
/// Identifies the avalonia property.
///
public static readonly StyledProperty MinWidthProperty =
AvaloniaProperty.Register(nameof(MinWidth));
///
/// Identifies the avalonia property.
///
public static readonly StyledProperty MinWidthOperatorProperty =
AvaloniaProperty.Register(nameof(MinWidthOperator), ComparisonConditionType.GreaterThanOrEqual);
///
/// Identifies the avalonia property.
///
public static readonly StyledProperty MaxWidthProperty =
AvaloniaProperty.Register(nameof(MaxWidth), double.PositiveInfinity);
///
/// Identifies the avalonia property.
///
public static readonly StyledProperty MaxWidthOperatorProperty =
AvaloniaProperty.Register(nameof(MaxWidthOperator), ComparisonConditionType.LessThan);
///
/// Identifies the avalonia property.
///
public static readonly StyledProperty MinHeightProperty =
AvaloniaProperty.Register(nameof(MinHeight));
///
/// Identifies the avalonia property.
///
public static readonly StyledProperty MinHeightOperatorProperty =
AvaloniaProperty.Register(nameof(MinHeightOperator), ComparisonConditionType.GreaterThanOrEqual);
///
/// Identifies the avalonia property.
///
public static readonly StyledProperty MaxHeightProperty =
AvaloniaProperty.Register(nameof(MaxHeight), double.PositiveInfinity);
///
/// Identifies the avalonia property.
///
public static readonly StyledProperty MaxHeightOperatorProperty =
AvaloniaProperty.Register(nameof(MaxHeightOperator), ComparisonConditionType.LessThan);
///
/// Identifies the avalonia property.
///
public static readonly StyledProperty ClassNameProperty =
AvaloniaProperty.Register(nameof(ClassName));
///
/// Identifies the avalonia property.
///
public static readonly StyledProperty IsPseudoClassProperty =
AvaloniaProperty.Register(nameof(IsPseudoClass));
///
/// Identifies the avalonia property.
///
public static readonly StyledProperty TargetControlProperty =
AvaloniaProperty.Register(nameof(TargetControl));
///
/// Gets or sets minimum bounds width value used for property comparison. This is a avalonia property.
///
public double MinWidth
{
get => GetValue(MinWidthProperty);
set => SetValue(MinWidthProperty, value);
}
///
/// Gets or sets minimum bounds width value comparison operator. This is a avalonia property.
///
public ComparisonConditionType MinWidthOperator
{
get => GetValue(MinWidthOperatorProperty);
set => SetValue(MinWidthOperatorProperty, value);
}
///
/// Gets or sets maximum width value used for property comparison. This is a avalonia property.
///
public double MaxWidth
{
get => GetValue(MaxWidthProperty);
set => SetValue(MaxWidthProperty, value);
}
///
/// Gets or sets maximum bounds width value comparison operator. This is a avalonia property.
///
public ComparisonConditionType MaxWidthOperator
{
get => GetValue(MaxWidthOperatorProperty);
set => SetValue(MaxWidthOperatorProperty, value);
}
///
/// Gets or sets minimum bounds height value used for property comparison. This is a avalonia property.
///
public double MinHeight
{
get => GetValue(MinHeightProperty);
set => SetValue(MinHeightProperty, value);
}
///
/// Gets or sets minimum bounds height value comparison operator. This is a avalonia property.
///
public ComparisonConditionType MinHeightOperator
{
get => GetValue(MinHeightOperatorProperty);
set => SetValue(MinHeightOperatorProperty, value);
}
///
/// Gets or sets maximum height value used for property comparison. This is a avalonia property.
///
public double MaxHeight
{
get => GetValue(MaxHeightProperty);
set => SetValue(MaxHeightProperty, value);
}
///
/// Gets or sets maximum bounds height value comparison operator. This is a avalonia property.
///
public ComparisonConditionType MaxHeightOperator
{
get => GetValue(MaxHeightOperatorProperty);
set => SetValue(MaxHeightOperatorProperty, value);
}
///
/// Gets or sets the class name that should be added or removed. This is a avalonia property.
///
[Content]
public string? ClassName
{
get => GetValue(ClassNameProperty);
set => SetValue(ClassNameProperty, value);
}
///
/// Gets or sets the flag whether ClassName is a PseudoClass. This is a avalonia property.
///
public bool IsPseudoClass
{
get => GetValue(IsPseudoClassProperty);
set => SetValue(IsPseudoClassProperty, value);
}
///
/// Gets or sets the target control that class name that should be added or removed when triggered, if not set is used or from . This is a avalonia property.
///
[ResolveByName]
public Control? TargetControl
{
get => GetValue(TargetControlProperty);
set => SetValue(TargetControlProperty, value);
}
}