c# core: set user state format

added preprocessor directive to support WP8