<commit_before>﻿using Avalonia.Layout;

#nullable enable

namespace Avalonia.Controls
{
    public partial class RelativePanel
    {
        private static void OnAlignPropertiesChanged(AvaloniaObject d, AvaloniaPropertyChangedEventArgs e)
        {
            if (d is Layoutable layoutable && layoutable.Parent is Layoutable layoutableParent)
            {
                layoutableParent.InvalidateArrange();
            }
        }

        static RelativePanel()
        {
            ClipToBoundsProperty.OverrideDefaultValue<RelativePanel>(true);

            AboveProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignBottomWithPanelProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignBottomWithProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignHorizontalCenterWithPanelProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignHorizontalCenterWithProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignLeftWithPanelProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignLeftWithProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignRightWithPanelProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignRightWithProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignTopWithPanelProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignTopWithProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignVerticalCenterWithPanelProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignVerticalCenterWithProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            BelowProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            LeftOfProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            LeftOfProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
        }

        /// <summary>
        /// Gets the value of the RelativePanel.Above XAML attached property for the target element.
        /// </summary>
        /// <param name="obj">The object from which the property value is read.</param>
        /// <returns>
        /// The RelativePanel.Above XAML attached property value of the specified object.
        /// (The element to position this element above.)
        /// </returns>        
        [ResolveByName]
        public static object GetAbove(AvaloniaObject obj)
        {
            return (object)obj.GetValue(AboveProperty);
        }

        /// <summary>
        /// Sets the value of the RelativePanel.Above XAML attached property for a target element.
        /// </summary><commit_msg>fix relativepanel<commit_after>﻿using Avalonia.Layout;

#nullable enable

namespace Avalonia.Controls
{
    public partial class RelativePanel
    {
        private static void OnAlignPropertiesChanged(AvaloniaObject d, AvaloniaPropertyChangedEventArgs e)
        {
            if (d is Layoutable layoutable && layoutable.Parent is Layoutable layoutableParent)
            {
                layoutableParent.InvalidateArrange();
            }
        }

        static RelativePanel()
        {
            ClipToBoundsProperty.OverrideDefaultValue<RelativePanel>(true);

            AboveProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignBottomWithPanelProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignBottomWithProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignHorizontalCenterWithPanelProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignHorizontalCenterWithProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignLeftWithPanelProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignLeftWithProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignRightWithPanelProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignRightWithProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignTopWithPanelProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignTopWithProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignVerticalCenterWithPanelProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            AlignVerticalCenterWithProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            BelowProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            LeftOfProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
            RightOfProperty.Changed.AddClassHandler<Layoutable>(OnAlignPropertiesChanged);
        }

        /// <summary>
        /// Gets the value of the RelativePanel.Above XAML attached property for the target element.
        /// </summary>
        /// <param name="obj">The object from which the property value is read.</param>
        /// <returns>
        /// The RelativePanel.Above XAML attached property value of the specified object.
        /// (The element to position this element above.)
        /// </returns>        
        [ResolveByName]
        public static object GetAbove(AvaloniaObject obj)
        {
            return (object)obj.GetValue(AboveProperty);
        }

        /// <summary>
        /// Sets the value of the RelativePanel.Above XAML attached property for a target element.
        /// </summary>
{'fraction_non_alphanumeric': 0.07741051549922932, 'fraction_numerical': 0.0, 'mean_word_length': 3.3195266272189348, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '414023', 'n_tokens_mistral': 1360, 'n_tokens_neox': 1303, 'n_words': 226}