- The Document Outline can be used to see the whole visual tree. I never really used it before but I can see how it could be useful.
- Right-Click on your XAML page and select Reset Layout > Reset All. That make all the controls on your form expand to fill their respective parent containers.
- Canvas's allow controls contained therein to be positioned absolutely with the left and top properties.
- You can create grid rows and columns simply by clicking on the border surrounding the grid in the designer.
- You can also insert a row or column by right-clicking the grid and selecting Insert. This renumbers all down stream controls, which will save some time if you have a lot.
- You can set multiple controls' margins (and other properties I am sure) by multi-selecting them and then using the properties window.
- To remove the margin (as well as other tags) from single or multiple controls, select them and then in the properties window, select the "Advanced properties" icon (a diamond), and select reset value. Setting the margin to zero leaves the attribute in the markup whereas using the advanced properties does not.
- You can select a keyed Style in the property window.
- Any control that uses Content instead of Text can be templated to contain just about anything.
- Textblocks can contain
tags which are like bits of text that can be formatted. For example: This text is bold and this text is red. All within one textblock. - Binding properties to other controls (and other resources) can be done easily through the advanced properties window.
- You can create a static resource of a custom class in the XAML and then bind to controls. Can also be done with collections. This is done by importing the namespace of your custom class and then in resource area (like the Grid.resources) do something like this <?xml:namespace prefix = namespace /><namespace:customclass property1="some text" property2="more text"></namespace:customclass>.... and collections are like this <namespace:customcollection><namespace:customclass property1="some text" property2="more text"></namespace:customclass>
Tuesday, May 17, 2011
From Zero to Silverlight in 75 minutes
Akthough this class was geared more to people who had no Silverlight experience, I was hoping to glean some tips and tricks. Here is some of what I learned:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment