Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
Microsoft Silverlight 5 is a rich application framework for creating high-performance, cross-platform desktop and mobile applications. In this course, author Walt Ritscher demonstrates how to build a variety of applications in Silverlight, with particular focus on building compelling business applications and delivering premium video and audio content. Developers will work with the C# programming language and Visual Studio Professional, as well as Expression Blend, a tool that simplifies creation of the interactive user interfaces expected in modern-day applications.
SilverLight runs in the browser which is a sizeable window your users will run the browser in windows of many sizes. A good UI design will be flexible when encountering different size environments. In this movie I want to show the Viewbox control. It provides a resizable container. That stretches or shrinks its contents to match the container size. It is most often used in conjunction with the Canvas panel. For this demonstration, I will use Visual Studio in a project called ChangeSizeWithViewBox. I am currently looking at the CanvasWithoutPage.
I have a Canvas containing some vector art. This flower is composed of Silverlight elements. It is not a photo, you can see that down here there is a Canvas that contains a number of ellipses and these ellipses are centered around this center ellipses. This ellipse is also contained inside a Grid which is inside my user control. I will run the application by pressing F5 and then I'll resize the browser window, even though the container, in this case, the Grid is being resized, the Canvas is not affected. I will take that exact same Canvas over here in the CanvasWithViewBox.
I'll wrap it inside this Viewbox control, there it is and I will place the Viewbox inside the Grid and the Grid goes inside the User control. With that simple change, I can now run the application, click on the WithViewBox tab, and now you see that the canvas is resizing. The elements retain their positions relative to each other. The Viewbox is just growing and shrinking the content of that canvas. When you need to size the contents of the Canvas, look to the Viewbox.
Find answers to the most frequently asked questions about Silverlight 5 Essential Training.
Here are the FAQs that matched your search "":
Sorry, there are no matches for your search ""—to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.