private bool IsBookmarked(WindowFrame frame)
        {
            if (!(frame.FrameView is ViewElement viewElement))
            {
                return(false);
            }

            //verifying whether there is viewElement's ancestor type of AutoHideChannel
            if (!AutoHideChannel.IsAutoHidden(viewElement))
            {
                return(false);
            }

            if (OrientationOfAutoHidden(viewElement) == _dockDirection)
            {
                return(true);
            }

            return(false);
        }
        protected bool ValidateOrReplaceViewGroup(ref ViewGroup viewGroup, WindowProfileValidationContext context)
        {
            DockOperations.TryCollapse((ViewElement)viewGroup);
            DockGroup dockGroup = viewGroup as DockGroup;

            if (dockGroup != null)
            {
                bool flag = this.ValidateOrReplaceDockGroup(ref dockGroup, context);
                viewGroup = (ViewGroup)dockGroup;
                this.ValidateOrReplaceViewElementCollection(viewGroup.Children, context);
                return(flag);
            }
            NestedGroup nestedGroup = viewGroup as NestedGroup;

            if (nestedGroup != null)
            {
                bool flag = this.ValidateOrReplaceNestedGroup(ref nestedGroup, context);
                viewGroup = (ViewGroup)nestedGroup;
                this.ValidateOrReplaceViewElementCollection(viewGroup.Children, context);
                return(flag);
            }
            AutoHideGroup autoHideGroup = viewGroup as AutoHideGroup;

            if (autoHideGroup != null)
            {
                autoHideGroup.SelectedElement = (ViewElement)null;
                bool flag = this.ValidateOrReplaceAutoHideGroup(ref autoHideGroup, context);
                viewGroup = (ViewGroup)autoHideGroup;
                this.ValidateOrReplaceViewElementCollection(viewGroup.Children, context);
                return(flag);
            }
            AutoHideChannel autoHideChannel = viewGroup as AutoHideChannel;

            if (autoHideChannel != null)
            {
                bool flag = this.ValidateOrReplaceAutoHideChannel(ref autoHideChannel, context);
                viewGroup = (ViewGroup)autoHideChannel;
                this.ValidateOrReplaceViewElementCollection(viewGroup.Children, context);
                return(flag);
            }
            ViewSite viewSite = viewGroup as ViewSite;

            if (viewSite != null)
            {
                bool flag = this.ValidateOrReplaceViewSite(ref viewSite, context);
                viewGroup = (ViewGroup)viewSite;
                this.ValidateOrReplaceViewElementCollection(viewGroup.Children, context);
                return(flag);
            }
            AutoHideRoot autoHideRoot = viewGroup as AutoHideRoot;

            if (autoHideRoot != null)
            {
                bool flag = this.ValidateOrReplaceAutoHideRoot(ref autoHideRoot, context);
                viewGroup = (ViewGroup)autoHideRoot;
                this.ValidateOrReplaceViewElementCollection(viewGroup.Children, context);
                return(flag);
            }
            DockRoot dockRoot = viewGroup as DockRoot;

            if (dockRoot == null)
            {
                return(this.ValidateOrReplaceCustomViewGroup(ref viewGroup, context));
            }
            bool flag1 = this.ValidateOrReplaceDockRoot(ref dockRoot, context);

            viewGroup = (ViewGroup)dockRoot;
            this.ValidateOrReplaceViewElementCollection(viewGroup.Children, context);
            return(flag1);
        }
 protected virtual bool ValidateOrReplaceAutoHideChannel(ref AutoHideChannel autoHideChannel, WindowProfileValidationContext context)
 {
     return(true);
 }
 public AutoHideChannelCustomSerializer(AutoHideChannel channel)
     : base((ViewGroup)channel)
 {
 }