c# - Help, i can't get my properties into the designer PropertyGrid -
what wrong this? property leftimage doesn't show in propertygrid (winforms .net 3.5)
private image _leftimage; /// <summary> /// sets small image appearing left of trackbar /// </summary> [ description("the small image appearing left of trackbar"), category("appearance"), editorattribute(typeof(system.drawing.design.imageeditor), typeof(system.drawing.design.uitypeeditor)), defaultvalueattribute(typeof(image),"null"), browsable(true), editorbrowsable(editorbrowsablestate.always) ] public image leftimage { private { return _leftimage; } set { if (value.height != 16 || value.width != 16) { _leftimage = new bitmap(value,new size(16,16)); } else _leftimage = value; invalidate(); } }
where go wrong??? ide doesn't complain anything, , compiles fine, , other properties show alright. thoughts?
remove private accessor on statement of leftimage. change to
get { return m_leftimage; }
Comments
Post a Comment