title: How to set rounded corners for an image control?
body: <h2>Background</h2>
  
  <p>I'm a noob on Windows Phone 8. I've learnt WPF and Silverlight in the past, but it was long ago.</p>
  
  <p>On Windows phone 8, I have a clickable Image control which I wish to have its content (the picture itself) to have rounded corners.</p>
  
  <h2>The question</h2>
  
  <p>How do I set rounded corners to a control?</p>
  
  <p>Also, I might consider having a Button control instead, so that I could customize what happens when it is being clicked (or touched). Upon clicking, I would like that the area that has the rounded corners would be colored in some color, showing that it was indeed being clicked/touched. How do I do that?</p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p>Thanks to @Depechie, I've found <a href="https://stackoverflow.com/a/5801561/878126">this solution</a>:</p>
  
  <pre><code>&lt;Grid&gt;
      &lt;Border Height="200" Width="250" CornerRadius="0,0,50,50"&gt;
          &lt;Border.Background&gt;
              &lt;ImageBrush ImageSource="Images/Desert.jpg" /&gt;
          &lt;/Border.Background&gt;
      &lt;/Border&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>However, I have two problems with that:</p>
  
  <ol>
  <li><p>I still can't find how to make it seen as clicked when you touch it, so that the rounded corners would have a yellow background. </p></li>
  <li><p>I can't get the imageSource and the converter (and its parameter) via code when handling the clicking event. Previously, I've used:</p>
  
  <p>Image thumbnailImage = (Image)sender;
  var bindingExpression = thumbnailImage.GetBindingExpression(Image.SourceProperty);
  string selectedItem = (string)bindingExpression.DataItem;
  string selectedThumbnailIndex = (string)  bindingExpression.ParentBinding. ConverterParameter;</p>
  
  <p>Maybe I could create the items programmatically instead of Xaml? If so, how (items are in a grid, btw)?</p></li>
  </ol>
  
  <p>What can I do now?</p>