title: How to do i eliminate Switch statement?
body: <p>I have a tab control which has 3 tab pages. Below this tab control on same form/view, i have 3 images controls.</p>
  
  <p>Based on SelectedIndex of tab, i need to change opacity of below 3 images.</p>
  
  <p>As of now i have something like this in SelectionChanged event of Tab control:</p>
  
  <pre><code>switch (Tab.SelectedIndex)
  {
       case 0:
           img1.Opacity= 1;
           img2.Opacity = 0.5;
           img3.Opacity  = 0.5;
           break;
       case 1:
           img1.Opacity = 0.5;
           img2.Opacity = 1;
           img3.Opacity  = 0.5;
           break;
       case 2:
           img1.Opacity = 0.5;
           img2.Opacity = 0.5;
           img3.Opacity = 1;
           break;
  }
  </code></pre>
  
  <p>How do i remove this switch statement? Which design pattern shall i use here ?</p>