<commit_before>﻿using Avalonia;
using Avalonia.Layout;
using Avalonia.Controls;

namespace StructuredLogViewer.Avalonia.Controls
{
    public class SplitterPanel : Grid
    {
        public GridLength FirstChildRelativeSize
        {
            get { return GetValue(FirstChildRelativeSizeProperty); }
            set { SetValue(FirstChildRelativeSizeProperty, value); }
        }

        public static readonly StyledProperty<GridLength> FirstChildRelativeSizeProperty =
            AvaloniaProperty.Register<SplitterPanel, GridLength>(nameof(FirstChildRelativeSize), new GridLength(1, GridUnitType.Star));

        public GridLength SecondChildRelativeSize
        {
            get { return GetValue(SecondChildRelativeSizeProperty); }
            set { SetValue(SecondChildRelativeSizeProperty, value); }
        }

        public static readonly StyledProperty<GridLength> SecondChildRelativeSizeProperty =
            AvaloniaProperty.Register<SplitterPanel, GridLength>(nameof(SecondChildRelativeSize), new GridLength(1, GridUnitType.Star));

        private readonly GridSplitter gridSplitter = new GridSplitter();

        public Orientation Orientation
        {
            get { return GetValue(OrientationProperty); }
            set
            {
                SetValue(OrientationProperty, value);
                UpdateRowColumnInfo();
            }
        }

        public static readonly StyledProperty<Orientation> OrientationProperty =
            AvaloniaProperty.Register<SplitterPanel, Orientation>(nameof(Orientation), Orientation.Horizontal);

        static SplitterPanel()
        {
            AffectsMeasure<SplitterPanel>(OrientationProperty);
        }

        private Control firstChild;
        public Control FirstChild
        {
            get { return firstChild; }
            set
            {
                if (firstChild != null)
                {
                    firstChild.PropertyChanged -= OnChildIsVisibleChanged;
                }

                firstChild = value;
                if (firstChild != null)
                {<commit_msg>Fix SplitterPanel initialization bug with Orientation set<commit_after>﻿using Avalonia;
using Avalonia.Layout;
using Avalonia.Controls;

namespace StructuredLogViewer.Avalonia.Controls
{
    public class SplitterPanel : Grid
    {
        public GridLength FirstChildRelativeSize
        {
            get { return GetValue(FirstChildRelativeSizeProperty); }
            set { SetValue(FirstChildRelativeSizeProperty, value); }
        }

        public static readonly StyledProperty<GridLength> FirstChildRelativeSizeProperty =
            AvaloniaProperty.Register<SplitterPanel, GridLength>(nameof(FirstChildRelativeSize), new GridLength(1, GridUnitType.Star));

        public GridLength SecondChildRelativeSize
        {
            get { return GetValue(SecondChildRelativeSizeProperty); }
            set { SetValue(SecondChildRelativeSizeProperty, value); }
        }

        public static readonly StyledProperty<GridLength> SecondChildRelativeSizeProperty =
            AvaloniaProperty.Register<SplitterPanel, GridLength>(nameof(SecondChildRelativeSize), new GridLength(1, GridUnitType.Star));

        private readonly GridSplitter gridSplitter = new GridSplitter();

        public Orientation Orientation
        {
            get { return GetValue(OrientationProperty); }
            set { SetValue(OrientationProperty, value); }
        }

        public static readonly StyledProperty<Orientation> OrientationProperty =
            AvaloniaProperty.Register<SplitterPanel, Orientation>(nameof(Orientation), Orientation.Horizontal);

        static SplitterPanel()
        {
            AffectsMeasure<SplitterPanel>(OrientationProperty);
        }

        private Control firstChild;
        public Control FirstChild
        {
            get { return firstChild; }
            set
            {
                if (firstChild != null)
                {
                    firstChild.PropertyChanged -= OnChildIsVisibleChanged;
                }

                firstChild = value;
                if (firstChild != null)
                {
{'fraction_non_alphanumeric': 0.06660254868958884, 'fraction_numerical': 0.0009617696561673479, 'mean_word_length': 2.360258481421648, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '934514', 'n_tokens_mistral': 1007, 'n_tokens_neox': 940, 'n_words': 199}