public void Update()
        {
            if (!IsValid)
            {
                return;
            }

            if (null != m_ContentRoot && InspectionContext.ApplyInspectorStyling)
            {
                StylingUtility.AlignInspectorLabelWidth(m_ContentRoot);
            }

            var state = Provider.MoveNext();

            if (m_PreviousState != state)
            {
                m_ContentRoot?.ClearTarget();
                switch (state)
                {
                case ContentStatus.ContentUnavailable:
                    return;

                case ContentStatus.ContentNotReady:
                    SetNotReadyContent();
                    break;

                case ContentStatus.ContentReady:
                    SetTarget();
                    break;

                case ContentStatus.ReloadContent:
                    SetNotReadyContent();
                    Load();
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }

            m_PreviousState = state;
        }
        public override VisualElement Build()
        {
            var root = new VisualElement();

            root.StretchToParentSize();
            Resources.Templates.Explorer.PropertyBagExplorer.Clone(root);
            var pooled = ListPool <BindingContextElement> .Get();

            try
            {
                root.Query <BindingContextElement>().ToList(pooled);
                foreach (var binding in pooled)
                {
                    binding.AddContext(Target.InspectionContext);
                }
            }
            finally
            {
                ListPool <BindingContextElement> .Release(pooled);
            }

            var split = root.Q <TwoPaneSplitView>(className: k_Splitter);

            split.fixedPaneInitialDimension = Target.InspectionContext.SplitPosition;
            split.schedule.Execute(() =>
            {
                if (null != split.fixedPane)
                {
                    Target.InspectionContext.SplitPosition = split.fixedPane.resolvedStyle.width;
                }
            }).Every(0);

            Target.InspectionContext.OnPropertyBagSelected += detail =>
            {
                m_CurrentPropertyBag.ClearTarget();
                m_CurrentPropertyBag.SetTarget(detail);
            };

            m_CurrentPropertyBag = root.Q <InspectorElement>(className: k_Detail);
            return(root);
        }