Completed
Last Updated: 25 Apr 2016 06:36 by ADMIN
ADMIN
Hristo
Created on: 24 Feb 2016 11:26
Category: PropertyGrid
Type: Feature Request
1
ADD. RadPropertyGrid - add support for highlighting the accessibilty objects when they are selected in the MS inspect tool
Until the new feature is officially released please use the implementation in the attached project.
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
3 comments
ADMIN
Dimitar
Posted on: 11 Apr 2016 06:31
The project is now updated and is working as expected when the toolbar is visible.
ADMIN
Dimitar
Posted on: 30 Mar 2016 11:48
Thank you for your feedback, we will further investigate this and update the attached project as soon as possible.
Daniel
Posted on: 30 Mar 2016 09:16
The implementation only works for a RadPropertyGrid with a hidden toolbar. As soon as you set RadPropertyGrid.ToolBarVisible=true, the coordinates returned by member Bounds of all MyPropertyGrid...AccessibilityObject's are wrong. Thus wrong items are highlighted. I haven't found a solution for this problem yet.
Then there are some minor correctable errors in code. For example you should replace the  methods GetFocused() and GetSelected() in class MyPropertyGridCellAccessibleObject by the following implementation:

        [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]
        public override AccessibleObject GetFocused()
        {
            Console.WriteLine("GetFocused()");

            MyPropertyGridGroupAccessibleObject group = this.parent as MyPropertyGridGroupAccessibleObject;

            if (group != null && ((MyPropertyGridGroupAccessibleObject)this.parent).Group == group.Control.SelectedGridItem)
            {
                return this;
            }

            MyPropertyGridItemAccessibleObject item = this.parent as MyPropertyGridItemAccessibleObject;

            if (item != null && ((MyPropertyGridItemAccessibleObject)this.parent).Item == item.Control.SelectedGridItem)
            {
                return this;
            }

            return null;
        }

        [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]
        public override AccessibleObject GetSelected()
        {
            MyPropertyGridGroupAccessibleObject group = this.parent as MyPropertyGridGroupAccessibleObject;

            if (group != null && ((MyPropertyGridGroupAccessibleObject)this.parent).Group == group.Control.SelectedGridItem)
            {
                Console.WriteLine("GetSelected() - Group " + this);
                return this;
            }


            MyPropertyGridItemAccessibleObject item = this.parent as MyPropertyGridItemAccessibleObject;
            if (item != null && ((MyPropertyGridItemAccessibleObject)this.parent).Item == item.Control.SelectedGridItem)
            {
                Console.WriteLine("GetSelected() - Item " + this);
                return this;
            }

            Console.WriteLine("GetSelected() - null");
            return null;
        }

And you should avoid using a null-object-reference by inserting
if (null != parentItemElement)
and 
if (null != parentGroupElement)
in the implemenation of the Bounds-member of same class, after these objects are assigned,