Fill Image in Ellipse (WPF)

Fill Image in Ellipse (WPF)



Image Brush is used to Fill Image Area of Ellipse




<!-- define Ellipse width of 100 and height 100 -->
<Ellipse Width="100" Height="100" Stroke="Red">
<!-- dependency Property of Ellipse -->
<Ellipse.Fill>
<!-- Image Brush is used to fill the Ellipse area into Image -->
<ImageBrush ImageSource="gc.jpg"></ImageBrush>
</Ellipse.Fill>
</Ellipse>



Note:-Make sure you image property set with Build Action=Resource and Copy to Directory =Copy Always


Attachments

Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: