How to set ImageView ScaleType to TOPCROP

Yesterday I have had the need to align TopCrop an image inside an Android ImageView. Unfortunally Android ImageView doesn’t allow this crop style, so I have implemented it by my own starting from a java sample. you can find the source code here:   


#CasualFriday – From Visual Studio Online to Lametric time® smart clock

The number of new smart devices to play with grows day after day. The baseline to work with them is essentially always the same set of technologies: federated authentication, OAuth2, REST, AngularJS, Typescript, cloud services… and to operate with a Lametric time ( makes no difference. To build a system that delivers relevant information from…


A logging solution for Windows Phone 8 / Windows 8 app developers

I have developed various applications, on both Windows Phone 7 and Windows Phone 8, and many times, I needed to analyze a log related to a strange behavior of one of my apps for a specific user. Often, it was not a crash but I needed to understand what the user did in order to…


NicolTIP#017: How to automate the build process (of WP7 apps and more:) with powershell

I developed for fun a couple a WP7 apps and I needed to automate (just a little bit:-) the release process, mainly because: The application version must be entered in various point and should be keep in sync I’d like to store all released version in a specific directory The easiest way I found to…


NicolTIP#006: how to show previous and next item using LINQ

I had a table on SQL 2005 I am accessing it via LINQ. I had to select an item via a “where” condition (see below). var item = (from snap in adc.Snapshots       where snap.file == image       select snap).First(); The problem was that I needed to identify the previous item and the next item…


Update WinForm interface from a different thread

Well, this is a typical issue when you have a thread that works (i.e. a Workflow) and a UI that needs to be updated. Let assume that you have a WinFom and you need to update its windows Title from another thread. The other thread needs to call “UpdateTitle” public method of current Form instance….


Avoid threads deadlock

On this month’s issue of MSDN Magazine, Stephen Toub describe the class DdMonitor. DdMonitor implements almost all interfaces exposed by .NET System.Threading.Monitor class but includes deadlock detection capabilities too. With the objective to make available a lock(…) keyword replacement, a static DdMonitor.Lock(…) is implemented too. A System.Threading.Monitor replacement to avoid threads deadlocks


How to digitally sign a string

The first step is to create a pair of key(pulic/private):RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();string publicKey = RSA.ToXmlString(false);string privateKey = RSA.ToXmlString(true); Private key is required to sign the string. Public key is required to verify if the sign is valid or not. Sequence required to create a sign is: select a private key select an HASH…