OwnerItem Property is Always Null

Nov 24, 2014 at 6:00 PM
Do you know any reason about why the OwnerItem property is always in null? I have the following scenario:

--> Tab1\
----> Panel1\
------> Panel has one RibbonButton\
--------> RibbonButton has several another child RibbonButton...

Then, in debugging time, none ribbon item has a value for OwnerItem property, however, OwnerTab and OwnerPanel whether has one.
Jan 8, 2015 at 6:35 PM
Implemented in changeset 30403.
Marked as answer by Stumpii on 1/8/2015 at 11:35 AM
Jan 12, 2015 at 2:09 PM
Thanks a lot for your coding time.

It works, but partially. Please see the image for better understanding.


Please let me know any questions.
Jan 12, 2015 at 2:51 PM
Don't see an image.
Jan 12, 2015 at 2:53 PM
Try again with this link.


Let me know, thanks.
Jan 12, 2015 at 8:42 PM
Ahh, it wont. OwnerItem by definition can only be a RibbonItem. RibbonPanel, RibbonTab and Ribbon don't derive from RibbonItem, so a button on the ribbon (not dropdown) will have RibbonItem = null.
With Owner, OwnerPanel, OwnerTab and OwnerItem, you should be able to accomplish what you need. If not, then please detail what you are try to accomplish.
Jan 13, 2015 at 12:04 PM
Thanks for a clear explanation. Understood. I've already built a recursive method to look the parent or owner of the top RibbonItem agree to the image above.

Last question, it is possible get some help from you about this workitem?: WorkItem: 1591

Thanks again.