Geeks With Blogs

News
Michael Crump Microsoft MVP, INETA Community Champion and XAML Advocate.

As you begin your WPF journey, you will have many frustrations with learning XAML. The three WPF control listed here were the things that frustrated me the most and I hope this helps someone out there.

1) Content controls such as the button can contain only a single nested element. But you can easily get around this with adding a StackPanel.

Not allowed!

image

Allowed!

image

2) Suppose you want to create a Mnemonic Keys and you are familiar with WinForms. Your first thought it to use “&Click Me”. In XAML, you create it with a “_” like “_Click Me”. This

Not allowed!

image

Allowed!

image

3) You should refer to the class name instead (Grid) when setting an attached property. If you refer to the instance name (grid1) it will not work.

Not allowed!

image

Allowed!

image

Posted on Friday, June 18, 2010 5:57 PM | Back to top

Copyright © mbcrump | Powered by: GeeksWithBlogs.net