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

[Enhancement] Enum/Any Member description converter #43

Open
CodingOctocat opened this issue May 23, 2023 · 1 comment
Open

[Enhancement] Enum/Any Member description converter #43

CodingOctocat opened this issue May 23, 2023 · 1 comment

Comments

@CodingOctocat
Copy link

For ToolTip.

public enum NicType
{
    [Description("xxx")]
    Ethernet,
    [Description("xxx")]
    Wlan,
    [Description("xxx")]
    Vm,
    [Description("xxx")]
    Ohter
}
<Label ToolTip="{Binding NicType, Converter={StaticResource EnumDescriptionConverter}}" />

Further, a generic MemberDescriptionConverter can be implemented, supporting not only Enum, but any member modified by the Description attribute.

@thomasgalliker
Copy link
Owner

I‘m not sure if such a converter already exists. I‘ll check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants