Leveraging Description Attribute in Enums
msaroka opened this issue · 2 comments
msaroka commented
If an Enum uses the Description attribute could we control the text displayed in the dropdowns and multiple checkboxes?
Below is an example of what I mean.
public enum FuelType
{
[Description("Bituminous Coal")] bit,
[Description("Home Heating and Diesel Fuel (Distillate)")] dfo,
[Description("Jet Fuel")] jf,
[Description("Kerosene")] ker,
[Description("Lignite Coal")] lig,
[Description("Municipal Solid Waste")] msw,
[Description("Natural Gas")] ng,
[Description("Petroleum Coke")] pc,
[Description("Propane Gas")] pg,
[Description("Residual Fuel Oil")] rfo,
[Description("Subbituminous Coal")] sub,
[Description("Tire -Derived Fuel")] tdf,
[Description("Waste Oil")] wo
}
Aaltuj commented
This is supported by the display attribute.
VxFormGenerator/VxFormGeneratorDemoData/VxFormLayoutAnnotated.cs
Lines 34 to 42 in 786fbc5
msaroka commented
Perfect. Thank you.