Shown below is scaffolding for the declaration of a variable and collecting modifications to it via user input. The User input will be a drop-down of ALL available colors. Is it possible to limit the selection of colors to a specific set of colors, say 3?
In the way you can limit a numerical input with the RangeAttribute?
Specifically, can I do this WITHOUT creating my own custom enums to represent the desired colors I want to have as user inputs?
Thanks,
FP
public class LTvwapOverlay2 : Indicator
{
...
private System.Windows.Media.Brush wClr_SP2 = Brushes.Red;
....
#region properties
[XmlIgnore]
[Display(ResourceType = typeof(Custom.Resource), Name = "Color of SD+2", Description = "", GroupName = "1) Weekly", Order = 6)]
public System.Windows.Media.Brush WClr_SP2
{
get {return wClr_SP2;}
set {wClr_SP2 = value;}
}
[Browsable(false)]
public string WClr_SP2Serializable
{
get { return Serialize.BrushToString(wClr_SP2); }
set { wClr_SP2 = Serialize.StringToBrush(value); }
}
.....

Comment