        {
            base.OnAttachedToVisualTree(e);
            LogicalChildrenOnCollectionChanged(null, null!);
        }

        private void LogicalChildrenOnCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
        {
            foreach (var child in LogicalChildren)
            {
                if (child is ContentPresenter cp)
                {
                    cp.ApplyTemplate();