public static ListDisplayWindow CreateListDisplayWindowForObject(object displayedObject, Cursor cursor)
        {
            ListDisplayWindow listDisplayWindow = new ListDisplayWindow(cursor);

            listDisplayWindow.HasMoveBar     = true;
            listDisplayWindow.HasCloseButton = true;
            listDisplayWindow.Resizable      = true;
            listDisplayWindow.ShowPropertyGridOnStrongSelect = true;
            listDisplayWindow.PrependIndex = true;

            listDisplayWindow.ListShowing = displayedObject as IEnumerable;

            // try to enable adding and removing - this is so common we're going to make it the default
            listDisplayWindow.EnableAddingToList();
            listDisplayWindow.EnableRemovingFromList();
            return(listDisplayWindow);
        }
        public SplinePropertyGrid(Cursor cursor)
            : base(cursor)
        {
            #region Exclude Members

            ExcludeMember("Visible");
            ExcludeMember("IsReadOnly");
            ExcludeMember("SplinePointVisibleRadius");
            ExcludeMember("PathColor");
            ExcludeMember("PointColor");
            ExcludeMember("Length");

            #endregion

            #region Create the ListDisplayWindow for this

            mListDisplayWindow        = new ListDisplayWindow(cursor);
            mListDisplayWindow.ScaleX = 10;
            mListDisplayWindow.ScaleY = 20;

            Button button = mListDisplayWindow.EnableAddingToList(typeof(SplinePoint));
            button.Text    = "Add Point";
            button.X      += 1;
            button.ScaleX += 1;

            button         = mListDisplayWindow.EnableRemovingFromList();
            button.Text    = "Remove Point";
            button.X      += 1;
            button.ScaleX += 1;

            mListDisplayWindow.ShowPropertyGridOnStrongSelect = true;
            mListDisplayWindow.AfterAddItem += AdjustNewSplinePoint;
            mListDisplayWindow.ListBox.StrongSelectOnHighlight = true;
            mListDisplayWindow.ListBox.Highlight += NewPointHighlighted;

            if (mSelectedObject != null)
            {
                mListDisplayWindow.ObjectDisplaying = this.ObjectDisplaying;
            }

            if (this.mUndoInstructions != null)
            {
                mListDisplayWindow.UndoInstructions = mUndoInstructions;
            }

            this.AddWindow(mListDisplayWindow, "Points");

            this.AfterUpdateDisplayedProperties += UpdateListDisplayWindow;

            #endregion

            #region Create the Scale Point Time Button

            Button scalePointTime = new Button(mCursor);
            scalePointTime.Text   = "Scale Point Time";
            scalePointTime.ScaleX = 10;
            scalePointTime.ScaleY = 1.3f;
            this.AddWindow(scalePointTime, "Points");

            scalePointTime.Click += ScalePointTimeClick;

            #endregion

            #region Create the Scale Point Position Button

            Button scalePointPosition = new Button(mCursor);
            scalePointPosition.Text   = "Scale Point Position";
            scalePointPosition.ScaleX = 10;
            scalePointPosition.ScaleY = 1.3f;
            this.AddWindow(scalePointPosition, "Points");

            scalePointPosition.Click += ScalePointPositionClick;

            #endregion

            #region Create the "Set Spline Start to 0" Button

            Button setSplineStartTo0 = new Button(mCursor);
            setSplineStartTo0.Text   = "Set Spline Start to 0";
            setSplineStartTo0.ScaleX = 10;
            setSplineStartTo0.ScaleY = 1.3f;
            this.AddWindow(setSplineStartTo0, "Points");
            setSplineStartTo0.Click += SetSplineStartTo0Click;

            #endregion

            SelectCategory("Uncategorized");
        }
        public static ListDisplayWindow CreateListDisplayWindowForObject(object displayedObject, Cursor cursor)
        {
            ListDisplayWindow listDisplayWindow = new ListDisplayWindow(cursor);
            listDisplayWindow.HasMoveBar = true;
            listDisplayWindow.HasCloseButton = true;
            listDisplayWindow.Resizable = true;
            listDisplayWindow.ShowPropertyGridOnStrongSelect = true;
            listDisplayWindow.PrependIndex = true;

            listDisplayWindow.ListShowing = displayedObject as IEnumerable;

            // try to enable adding and removing - this is so common we're going to make it the default
            listDisplayWindow.EnableAddingToList();
            listDisplayWindow.EnableRemovingFromList();
            return listDisplayWindow;
        }
        public PositionedModelPropertyGrid(Cursor cursor)
            : base(cursor)
        {
            ExcludeAllMembers();

            #region Include Basic Members

            IncludeMember("X", "Basic");
            IncludeMember("Y", "Basic");
            IncludeMember("Z", "Basic");



            IncludeMember("RotationX", "Basic");
            IncludeMember("RotationY", "Basic");
            IncludeMember("RotationZ", "Basic");

//            IncludeMember("Visible", "Basic");
            IncludeMember("CursorSelectable", "Basic");

            IncludeMember("Name", "Basic");

            IncludeMember("IsAutomaticallyUpdated", "Basic");

            IncludeMember("Visible", "Basic");

            #endregion

            #region Include "Scale" members

            IncludeMember("ScaleX", "Scale");
            IncludeMember("ScaleY", "Scale");
            IncludeMember("ScaleZ", "Scale");

#if !FRB_MDX
            IncludeMember("FlipX", "Scale");
            IncludeMember("FlipY", "Scale");
            IncludeMember("FlipZ", "Scale");
#endif

            #endregion

            #region Include "Rendering" members

            IncludeMember("FaceCullMode", "Rendering");

            #endregion

            #region Include Relative Members

            IncludeMember("RelativeX", "Relative");
            IncludeMember("RelativeY", "Relative");
            IncludeMember("RelativeZ", "Relative");

            IncludeMember("RelativeRotationX", "Relative");
            IncludeMember("RelativeRotationY", "Relative");
            IncludeMember("RelativeRotationZ", "Relative");

            #endregion

            #region Include Animation Members

#if FRB_XNA
            //IncludeMember("HasAnimation", "Animation");
            //IncludeMember("Animate", "Animation");
            //IncludeMember("CurrentAnimation", "Animation");

            //mCurrentAnimationComboBox = new ComboBox(GuiManager.Cursor);
            //mCurrentAnimationComboBox.ScaleX = 6;
            //ReplaceMemberUIElement("CurrentAnimation", mCurrentAnimationComboBox);

            mHierarchyFileTextBox        = new FileTextBox(GuiManager.Cursor);
            mHierarchyFileTextBox.ScaleY = 1.5f;
            mHierarchyFileTextBox.ScaleX = 15;
            List <string> fileTypes = new List <string>();
            fileTypes.Add("wbi");
            fileTypes.Add("whe");
            mHierarchyFileTextBox.SetFileType(fileTypes);
            this.AddWindow(mHierarchyFileTextBox, "Animation");
            mHierarchyFileTextBox.FileSelect += new GuiMessage(LoadSkeleton);



            mAnimationListDisplayWindow        = new ListDisplayWindow(cursor);
            mAnimationListDisplayWindow.ScaleX = 15;
            mAnimationListDisplayWindow.ScaleY = 15;
            mAnimationListDisplayWindow.ListBox.StrongSelect += new GuiMessage(StrongSelectAnimation);
            mAnimationListDisplayWindow.ListBox.Highlight    += new GuiMessage(ShowAnimationPropertyGrid);
            this.AddWindow(mAnimationListDisplayWindow, "Animation");



            mAddAnimationButton        = new Button(GuiManager.Cursor);
            mAddAnimationButton.Text   = "Add Animation";
            mAddAnimationButton.ScaleX = 8.5f;
            mAddAnimationButton.ScaleY = 1.5f;
            this.AddWindow(mAddAnimationButton, "Animation");
            mAddAnimationButton.Click += new GuiMessage(AddAnimationClick);

            mRemoveAllAnimationDataButton        = new Button(cursor);
            mRemoveAllAnimationDataButton.Text   = "Remove All Anim Data";
            mRemoveAllAnimationDataButton.ScaleX = 8.5f;
            mRemoveAllAnimationDataButton.ScaleY = 1.5f;
            this.AddWindow(mRemoveAllAnimationDataButton, "Animation");
            mRemoveAllAnimationDataButton.Click += new GuiMessage(RemoveAllAnimationButtonClick);


            mAnimationListDisplayWindow.EnableRemovingFromList();
#endif
            #endregion



            #region Remove Uncategorized and set default category
            RemoveCategory("Uncategorized");

            SelectCategory("Basic");
            #endregion

#if FRB_XNA
            PropertyGrid.SetPropertyGridTypeAssociation(typeof(Animation3DInstance), typeof(Animation3DInstancePropertyGrid));
#endif

            ShowIColorableProperties();

            this.X = this.ScaleX;
            this.Y = this.ScaleY + Window.MoveBarHeight + 3;
        }