Silverlight Feeds - All your Silverlight feeds in one place.

Monday, February 01, 2010

Quick tip: Commenting out properties in XAML

by Laurent Bugnion via Silverlight on 2/1/2010 5:26:05 PM

Often when you write XAML, you wish you could ignore a property temporarily. In code, it is easy to do: Just comment out the line where the property is set, and you are good to compile. LayoutRoot.Background = new SolidColorBrush(Colors.Red); //LayoutRoot.DummyProperty = "Ignored"; /* LayoutRoot.Another = "Ignored too"; */ In XAML it is not so easy, because XML (of which XAML is a dialect) does not have line comments, but only block comments. You can comment out a whole XAML element, but not j ...

[ read more ]

Quick tip: Commenting out properties in XAML

by Laurent Bugnion via Silverlight on 2/1/2010 5:26:05 PM

Often when you write XAML, you wish you could ignore a property temporarily. In code, it is easy to do: Just comment out the line where the property is set, and you are good to compile. LayoutRoot.Background = new SolidColorBrush(Colors.Red); //LayoutRoot.DummyProperty = "Ignored"; /* LayoutRoot.Another = "Ignored too"; */ In XAML it is not so easy, because XML (of which XAML is a dialect) does not have line comments, but only block comments. You can comment out a whole XAML element, but not j ...

[ read more ]

Quick tip: Commenting out properties in XAML

by Laurent Bugnion via Silverlight on 2/1/2010 5:26:05 PM

Often when you write XAML, you wish you could ignore a property temporarily. In code, it is easy to do: Just comment out the line where the property is set, and you are good to compile. LayoutRoot.Background = new SolidColorBrush(Colors.Red); //LayoutRoot.DummyProperty = "Ignored"; /* LayoutRoot.Another = "Ignored too"; */ In XAML it is not so easy, because XML (of which XAML is a dialect) does not have line comments, but only block comments. You can comment out a whole XAML element, but not j ...

[ read more ]

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. Silverlight Feeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on Silverlight Feeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us