fr en

Put on attribute per line in XAML files in Silverlight

2011-08-15 1 min read .NET Silverlight Visual Studio 2010 Aymeric
A XAML file can be unreadable when there are a lot of attributes in controls. Lines are often too long to be displayed on screen (horizontal scrollbar is required). Visual Studio 2010 offers an option allowing us to put one attribute per line automatically to facilitate code reading. So, when you have written your code, press Ctrl+K+D to format XAML. To activate this option, go to Tools -> Options, then open Text Editor -> XAML -> Formatting and select Spacing. Continue reading

How to use mouse wheel on Silverlight and Chrome when Windowless is enabled

2011-06-17 4 min read .NET Silverlight Aymeric
In Silverlight, the mouse wheel works very well with every main browser (Internet Explorer, Firefox, Chrome, etc.) but not when Windowless is enabled. When this feature is enabled, NAPI based browsers like Chrome or Firefox don’t allow Silverlight to manage the mouse wheel. This article explains how to get the mouse wheel event using DOM. This article is based on code published on Compiled Experience but I’ve added some modifications to consider elements inherited from ItemsControl. Continue reading