The next Layout Container that we are going to look at is a border. A border is again another simple Layout Container, but in this case I am going ahead and select on my three elements, number one, number two and number three. And when I right click on them, one of the menu options is group into. This command is always available and allows you to take the current selection and wrap them with the lay out container. In this case, I am going to wrap them with the border. Now, the border by itself does not look too interesting and in fact by default is not even present. I am going to select the border and I am going to go into the Properties Inspector to change some of these properties. Since the last time I was in the Property Inspector, I search for the clip, I am going to press the X to clear out my search and bring back all my properties.
By default, the background and border brush or both no brushes, so they do not display. I am going to change the border brush to a solid brush and make it black. The next property I am going to work with is the corner radius. The border control allows you to set the corner radius on each corner individually. So, if for instance I set it to 10, 10, 10, 10, I am establishing that I want each corner of the border to be 10 pixels around it. The border fitness is still sets to 0 on all sides so the border still is not displaying. I am going to change this by setting these all to 5. You will notice as I set the values that each portion of the border is being filled in. The border is unique and that it is the only Windows Presentation Foundation you drawn that allows you to set the border thickness on each portion independently. The numbers displayed as the corner radius start in the top left corner and then go around. So if I change the corner radius to 10, 0, 0, 0, you will notice that the top left corner is rounded but the rest of the corner just square it off.
To border control by itself, again, does not have any concept of relaying out the elements in sided it. It only allows you a convenient way to group your controls together, so that you can move them around. As I resize the border element, since each first child is a grid the resize behavior of the border element becomes the resize behavior of the grid inside it. We are done looking at the border elements, so once again, I am going to press the CONTROL Z to bring myself back to the state I was in before hand. I need to press it a few more times because I set some properties while I was working.
Transcription by:
Scribe4you Transcription Services