Live Chat Icon For mobile
Live Chat Icon

How do I draw a border outside the bounds of a control?

Platform: WPF| Category: Border

WPF lets you specify a negative value for the Border’s Margin. This way the available size for the children of the Border will not reduce when a Border is rendered.


<Border Margin='-1,-1,-1,-1' BorderThickness='1' BorderBrush='Black'>
      <MyControls/> 
 </Border>

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.