Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Search

Converting StorageFiles (png) to a Byte[] in order to display as an Image in WinRT (C#)

AddThis Social Bookmark Button
When you are building Metro Applications it will be very common that your application will have image (.png) files stored in local isolated storage and that you will want to show these images to the users inside your application.  In this post i am going to walk you though how to access these stored files and how to show them inside your XAML application. Step 1: How to access the Storage File var packageLocation = Windows.ApplicationModel.Package.Current.InstalledLocation; var assetsFolder = await packageLocation.GetFolderAsync("Assets"); StorageFile myImage = await assetsFolder.GetFileAsync("myFile.png"); // We now have our StorageFile to work with In the above code we are
going to get the point to the current installed location.  Once we have that we are going to get the folder which holds our file, in our case Assets.  Once we have our folder we want to get the file via the GetFileAsync.  Once this completes we now have our pointer to StorageFile to work with. *** NOTE ***
If the folder/files are not found then an exception will be thrown so make sure you take this into account Step 2: How to convert the file to a Byte[] var bytes = await GetBtyeFromFile(myImage); // This is the method...(Read whole news on source site)

How to find out the Space in isolated storage in Windows Phone?

AddThis Social Bookmark Button
The IsolatedStorageFile class in Windows Phone provides the methods that indicate the amount of space (free/total space) for isolated storage. The IsolatedStorageFile class has the following members which could be used to find out the space related information for isolated storage. 1. Quota – This property will return the maximum amount of space available for the isolated storage. 2. AvailableFreeSpace – This property will return the available space for isolated storage. decimal availablespace, Quota; using (var store = IsolatedStorageFile.GetUserStoreForApplication()) { availablespace = store.AvailableFreeSpace ; Quota = store.Quota ; } MessageBox.Show("Available : " + availablespace.ToString() + ",Quota : " + Quota.ToString());

#596 – Using Lamba Expressions When Declaring Event Handlers

AddThis Social Bookmark Button
When you attach an event handler to an event in WPF, you can use several different types of syntax for specifying the method that will serve as a handler.  This includes using both anonymous methods and lambda expressions. Below are some examples of declaring an event handler using a lambda expression. Filed under: Events Tagged: [...]

Getting Started with Math.NET and F# Programming

AddThis Social Bookmark Button
This is the first blog in a series to help F# programmers keep up-to-date with different ways of doing numerically-oriented programming with F#. The first posts in this series will focus on the open source Math.NET Numerics library. Math.NET Numerics is an opensource numerical library for F# and C# on .NET and Mono, including implementations of .NET supporting .NET portable code (Metro and Silverlight). Math.NET Numerics is the numerical foundation of the Math.NET project, aiming to provide methods and algorithms for numerical computations in science, engineering and every day use. Covered topics include special functions, linear algebra, probability models, random numbers, interpolation, integral transforms
(FFT) and more. In this post, we look at the basics of getting started with Math.NET. To install Math.NET Numerics, you do one of the following: Download Math.NET from http://numerics.mathdotnet.com/. To install, simply unzip it (remember the location, you'll need it later)   or, if using Visual Studio 2012, add it as a NuGET package to anF# project by right-clicking on a project node, choosing "Manage NuGet packages...", choose the "Online" tab, and search for "mathnet", "numerics" or a similar search term. Install the package "Math.NET Numerics", and, if desired "Math.NET Numerics F# Modules". The DLLs will be installed as a dependency in your project. ...(Read whole news on source site)

Google Analytics for Windows Phone

AddThis Social Bookmark Button
Release to help WP7 developers get Google Analytics to work with their Windows Phone application. The majority of the source is from the Microsoft Silverlight Analytics Framework. - Now with support for Real Time tracking in Google Analytics, when using TrackPage. Available via NuGet To install Google Analytics for Windows Phone, run the following command in the Package Manager Console: Additional Development Resources Google Analytics on your Windows Phone App in 1 minute Google Analytics Real Time tracking for Windows Phone, who’s using my app right now?

Event: TechEd Europe - Can Windows Azure really make your boss happy?

AddThis Social Bookmark Button
By Jen Stirrup There’s been a swathe of new technological advancements announced at TechEd Europe and Microsoft keynotes. But what does it actually mean for your business? In other words, can it help you to make your boss happy? Windows Azure is becoming a more compelling technology, since there are now clearer messages on how it can solve business needs. Scott Guthrie recently held a Keynote on the new advancements in Windows Azure, and you can see the keynote here. What are the business benefits of Windows Azure? Large Deployment Strategy - The new revised Windows Azure Portal
makes it easier for you to manage large deployments. It supports all the new features, which brings me onto my next point: Windows Azure supports Virtual Machines - Microsoft offer default VMs, or you can upload your own VMs. Why is this useful to businesses? There are a few use cases that I can foresee. For example, if you are a consultancy, you might need VMs for demo purposes, or just prototyping client projects. This also applies to businesses of any size. For example, Business Intelligence projects are notorious for their failure rate. Therefore, it is presents less financial risk to...(Read whole news on source site)

Geo Location & Spatial Searches with RavenDB–Part VII–RavenDB Client vs. Separate REST Service

AddThis Social Bookmark Button
In my previous post, I discussed how we put the GeoIP dataset in a separate database, and how we access it through a separate session. I also asked, why use RavenDB Client at all? I mean, we might as well just use the REST API and expose a service. Here is how such a service would look like, by the way: public class GeoIPClient : IDisposable { private readonly HttpClient httpClient; public GeoIPClient(string url, ICredentials credentials) { httpClient = new HttpClient(new HttpClientHandler{Credentials = credentials})
{ BaseAddress = new Uri(url), }; } public Task GetLocationByIp(IPAddress ip) { if (ip.AddressFamily != AddressFamily.InterNetwork) return null; var reverseIp = (long)BitConverter.ToUInt32(ip.GetAddressBytes().Reverse().ToArray(), 0); ...(Read whole news on source site)

DotNed Podcasts: Wouter van Vugt over SharePoint

AddThis Social Bookmark Button
In deze podcast spreekt Maurice de Beijer met Wouter van Vugt over hoe hij SharePoint inzet bij grote projecten. Wouter verteld hou hij SharePoint niet alleen voor de interne automatisering inzet maar ook voor de publieke pagina’s en de gepersonaliseerde pagina’s waar klanten op inloggen. Hij verteld ook over zijn ervaring met het integreren met DigiD.   Luister of download de podcast hier.   Met dank aan onze sponsor RedGate.   Enjoy!

Home