Prev | Current Page 137 | Next

Matthew MacDonald

"Pro WPF with VB 2008: Windows Presentation Foundation with .NET 3.5"

It will also include the series of spaces inside the text and the hard
return that follows the text.
If you just want to keep the spaces inside, you??™ll need to use this less-readable markup:
>[There is a lot of space inside these quotation marks " ".]
The trick here is to make sure no whitespace appears between the opening > and your
content, or between your content and the closing <.
Once again, this issue only applies to XAML markup. If you set the text in a text box programmatically,
all the spaces you include are used.
Events
So far, all the attributes you??™ve seen map to properties. However, attributes can also be used to
attach event handlers. The syntax for this is EventName="EventHandlerMethodName".
For example, the Button control provides a Click event. You can attach an event handler
like this: