Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
200
Protected Role property
posted

Hi,

I'm trying to convert a style I have for a System.Windows.Controls.MenuItem and there I have a trigger on the Role property of the item.

When trying to copy it to the XamMenuItem I discovered that the Role property on XamMenuItem is protected and therefore I can't use it for triggers...

Any workarounds?

thanks 

Parents
No Data
Reply
  • 138253
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into it and I created a sample project with the functionality you want. Basically I created a new class that inherits the XamMenuItem and added a Dependency Property, which is set to the XamMenuItem’s Role Property. This way the Role Property is exposed in the new class. Please let me know if you need further clarification on this matter.

     

    Looking forward for your reply.

    XamMenuItemRoleProperty.zip
Children