Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix/CategoryOrderAttribute fixes #1523

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Hotfix/CategoryOrderAttribute fixes #1523

wants to merge 2 commits into from

Commits on Aug 19, 2019

  1. Added missing TypeId pverride

    Since the CategoryOrderAttribute is set to AllowMultiple-true, you must specify a TypeId to ensure uniqueness.  Since this attribute should only have one instance per Category, we use CategoryValue as the key.
    MarqueIV committed Aug 19, 2019
    Configuration menu
    Copy the full SHA
    15e7e7b View commit details
    Browse the repository at this point in the history
  2. Update GetCategoryOrder to use TypeDescriptor.GetAttributes

    Update the logic in GetCategoryOrder to use TypeDescriptor.GetAttributes instead of Type.GetCustomAttributes as the latter doesn't take into consideration those attributes added at runtime via TypeDescriptor.AddAttributes.  As such, without this change, the property grid doesn't respect dynamically added values for category ordering such as when creating custom PropertyDescriptors in a TypeConverter's GetProperties call.
    MarqueIV committed Aug 19, 2019
    Configuration menu
    Copy the full SHA
    aee9e8b View commit details
    Browse the repository at this point in the history