c# - Where would the responsibility to handle this event be placed? -


i have navigationbar.cs user control. have navigationitem.cs user control.

here's code both:

using system; using system.collections.generic; using system.componentmodel; using system.drawing; using system.data; using system.linq; using system.text; using system.windows.forms;  namespace uboldi.customui {     public partial class navigationbar : usercontrol     {         public navigationbar()         {             initializecomponent();         }          public list<navigationitem> navigationitems { private get; set; }         public navigationitem selecteditem { get; set; }     } }   using system; using system.collections.generic; using system.componentmodel; using system.drawing; using system.data; using system.linq; using system.text; using system.windows.forms;  namespace uboldi.customui {     public partial class navigationitem : usercontrol     {         public navigationitem()         {             initializecomponent();         }          private image _picture = null;         public image picture         {                         {                 return _picture;             }             set             {                 _picture = value;                 ptbicon.image = _picture;             }         }          private string _content = null;         public string content          {                         {                 return _content;             }             set             {                 _content = value;                 lbldisplaytext.text = _content;             }         }     } } 

i want single navigationitem in navigationbar 'selected' @ given time.

when item selected different color given it.

my question is, should program code? in bar, or button should , have bar invoke setyourselfasselected() method?

thanks.

i implement functionality in navigationbar following reason: other developer use navigationitems in different context no active items marked or marked different. or 1 wants overload navigationbar implement behaviour active items.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -