All right so let me show you a really simple example of panel and how it lays out children. Let us all tab in the XamlPad and I can show you the example.
First, let us maximize the screen and then makes some room for the editor by dragging this up. All right, so a XamlPad is a really handy application that we actually have not encountered yet. The cool thing about XamlPad is that, anything you type here in the lower pane gets parsed and shows up, up here in the upper pane. And that happens almost immediately. The great thing about a XamlPad is that it is free. You can actually get XamlPad as a part of the Windows SDK or if you want, there is handful of other XamlPad replacements that you can find on the web. Including XAML, which is an application that I wrote or there is another one called XamlPadX which was created by Lester Lobo. If you do search on the internet, you should be able to find that either one of those. And the additional things that a XamlPad cannot do, another thing is there are much smaller download because if you want XamlPad, you just have the download the entire SDK for the .NET Framework 3.0.
So by default, XamlPad uses this feature called auto parts. You might notice that when using auto parts, if you type something wrong like this, that the text turns red. This is an indication to you that there was some kind of an error while parsing the Xaml. For the purpose of this training, I am going to turn off auto parse. And the result of that will be that anytime I want a parse actually either need to click on the refresh button or I can just use F5 and it will happen for me automatically. So let us go ahead and clean up this text. And then I will hit F5, and we can see that is now this parse is correct again.
So, XAmplPad is a great application for seeing how layout works. In fact, here is an interesting side, XamlPad was actually originally written as a testing tool by the layout guys on the WPF team in Microsoft. And they build it specifically so they could quickly preview the way that they layout things that are working on actually worked under certain configurations. And everyone like this so much. Even people outside of the layout teams that eventually it is being used by everybody as prolific mind of the team, so they incorporated it into the SDK and now, it is pretty much standard fair for anybody who is using WPF.
Transcription by:
Scribe4you Transcription Services