Over a million developers have joined DZone.

Creating Borders in Silverlight

· Mobile Zone
So this might seem simple enough but I was asked a couple times recently so I thought I would put a post out there on topic, ok so its more of a half tweet half blog post as its pretty simple but here is how to create a 'border' in silverlight without some hack on a rectangle or some sillyness.

<border borderthickness="20" background="white" borderbrush="Green" padding="3" cornerradius="10" >
<textblock text="Hello World" />
</textblock>
<border/>

So here you can see that you have some basic properties you can sent, like color, padding, thickness but intellisence in visual studio will tell you all you need to know. and thats it, that is how to create a use a 'border' in XAML in Silverlight.
Topics:

Published at DZone with permission of David Kelley. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}