How to get the absolute positon for custom component?

i am making a custom component,and need get itself’s absolute position…
i try : “this.m_attributes.Bounds.Y” and"Grasshopper.Instances.ActiveCanvas.Location" they are failed.
Thank you for any advise!
image

The bounds of the attributes are in content coordinates, not control coordinates. But all you have to do is ask the canvas viewport to convert them from one into the other.

Canvas.Viewport.ProjectPoint(PointF point)