Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Creating Borders in Silverlight

DZone's Guide to

Creating Borders in Silverlight

· Mobile Zone
Free Resource

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.

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.

Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.

Topics:

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

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}