DCSIMG
.NET 4.5,JavaScript - Shai Raiten's Blog

Shai Raiten's Blog

It's all about code...

Browse by Tags

All Tags » .NET 4.5 » JavaScript (RSS)
How To: Compress Files In WinRT
Windows Store apps are aligned with PLM philosophy (Only active application will use device resources), and because of this most Windows Store apps needs to save their data locally until the next application execution. Windows Store apps can also use the Roaming folder to save files and settings that will be sync with the user Windows Live account, when saving settings or files to Roaming folder you need to make sure those files are not too big so Windows 8 will be able to sync the Roaming folder...
Windows 8 Metro – Code Behind
When I develop Windows 8 Metro App I usually use Windows Store app samples to see code examples features but sometimes you want more… For example I really want to know how “Mail” metro app works: How getting access to other email account, sending email and more. So in order to to that I had to gain access to “Mail” metro app… Let’s start the Hack: Problem: WindowsApps folder is blocked and by default you can’t open this folder. Solution : First open Windows Explorer and navigate into “C:\Program...
Windows 8 RTM JavaScript–Change Lock Screen Image
Tweet In the past couple of months I’ve worked a lot with Windows 8 JavaScript and C#, I’ve also wrote plenty of posts on that subject and there is much more stuff to talk about. In this post I’ll show two things: Using File Picker using JavaScript Change Windows 8 Lock Screen Image Programmatically Download Demo Project Step 1: Create Blank JavaScript Project In the app.onactivated function we add the following code to listen the Choose Picture button and calling the displayCurrentImg function....
How To: Bing Maps Custom Tile Overlay - Google Maps
Tweet I got a question from a friend who wanted to replace Bing Maps Tiles with Google Maps Tiles . You might ask yourself why? If you want Google Tiles just replace Bing Control and work with Google Maps…..  In this case I want to work with Bing Map Control because the benefits I get in Metro Applications in Windows 8 for C#, C++, VB.NET and JavaScript.  And I also want Google Maps language support . Download Demo Project Currently Bing Maps doesn't support any language except English...
How To: Bing Maps For Windows 8 Metro Apps - JavaScript
In my last post I talked about Bing Map for C# , but you can also do the same of JavaScript projects using Bing Maps SDK. Download Demo Project Step 1: Maps Developer Account Before you can use Bing Sdk from Windows 8 Metro App you need Maps Developer Account, open http://www.bingmapsportal.com/ , create or enter with existing Windows Live account. Choose “ Create or view keys ” and create new Key for your application. Step 2: Create Bing Maps Metro Application Download the latest bits - Bing Maps...
Upgrade Metro App From Beta To RC
In my previous post Convert VS 11 Beta Metro Projects To VS 2012 RC I talked about upgrading the Project file from Beta to RC, in this post I’ll try to talk about all changes made from Beta to RC. I don’t know all the breaking changes in JavaScript and C# but I collect all the breaking changes from the application and games I develop and I’ll show them here. JavaScript + HTML Type Old Value New Value Comment Event MSGestureTap onclick   Event MSGestureHold oncontextmenu   Method getPointerList...
Convert VS 11 Beta Metro Projects To VS 2012 RC
Over the last months I’ve worked a lot with Windows 8 Metro applications, from Consumer Preview to Preview 2 and now to RC. When working on Beta versions you know that you have to upgrade your app when RC or RTM versions will published, and sometime those upgrades can take a while… So this is the first part of upgrading your Project from Visual Studio 11 Beta to Visual Studio 2012 RC, in my next post I’ll talk about code Changes from Beta to RC both for C# and JavaScript. JavaScript For JavaScript...
Windows 8 – Icons
Tweet Everyone who start developing for Windows 8 most heard about the AppBar control, the AppBar control is a navigation bar allowing the developer to add commands for his application. When you define a command for AppBar you can set a Icon for it and there is already a lot of icons available for you out of the box in any Metro app. To use those built it icons in C# and JavaScript you just need to set the font-family to - Segoe UI Symbol and write down the hexadecimal value of the icon. Because...
Window 8 JavaScript–Asynchronous Programming & App Storage
Tweet In this post I’m going to talk about WinJS.xhr that makes an XMLHttpRequest as a Promise, and how to save and load images and from your local storage. What is a Promise? Promise is a way for Asynchronous Programming in JavaScript , Avoiding synchronous execution in single-threaded languages like JavaScript is necessary in order to create apps that are responsive and high performing. Windows Library for JavaScript provides a consistent and predictable mechanism called a Promise that simplifies...
Windows 8 JavaScript – Pinch
Tweet Over the last posts I talked about basic features in Windows 8 Metro Apps in BLOCKED SCRIPT Settings Message Dialog Splash Screen The feature I’m going to show you now isn’t part of JavaScript Metro app and you need to write some code and use Metro Touch Event called – MSPointerMove. The feature I’m going to simulate is Pinch - Download Demo Project In this post I’ve created a Pinch functionality to increase and decrease zoom on specific item. Step 1: Create JavaScript Metro Project In the...
Windows 8 JavaScript – Message Dialog
Tweet In my previous post I talked about App Settings , and now it’s time to talk about on of the most important things – Message Dialog. Download Demo Project I’ve already saw people who wrote overlay div to show messages, just because they didn’t find how to add more buttons for the Message Dialog, so let me show you how- Using the WinRT you can use the MessageDialog to popup a message to the user: var msg = new Windows.UI.Popups.MessageDialog( "Message Content" , "Your Message Title"...
Windows 8 JavaScript – Settings
Tweet In my previous post I talked about Windows 8 JavaScript Metro App Basics , and some getting started with the new Metro Apps. In order to help you get inside Windows 8 Metro Apps I’ll start writing on specific features in Metro Apps, starting from Settings. As you build your Metro App you probably need to let the user to change some settings in the application, you don’t need to write any things special for that because Win8 comes with integrated Settings Pane allow you to add your own settings...
Windows 8 JavaScript Metro Application–Getting Started
Tweet Today Windows 8 Consumer Preview is out! , you can read more at Somasegar's WebLog or Jason Zander's WebLog . Over the past couple of months I’ve built Applications and Games for Windows 8. This was an amazing experience especially when I built everything in JavaScript, as you know Windows 8 allow you to build metro application in: C++ C#  JavaScript This first part will focus on the main structure and basics of JavaScript Grid Application and over the next posts I’ll drill down...