Developer code samples

Download code samples and applications for Windows 8, Windows Phone, Microsoft Azure, Office, SharePoint, Silverlight and other products. You can also explore the Official Visual Studio C#, VB.NET, and 101 LINQ samples.New samples are added frequently in JavaScript, C++, C#, Visual Basic, and F#.

Each sample is licensed to you by the party distributing it. Microsoft does not guarantee the samples or grant rights for any sample distributed by a party other than Microsoft. Use of this site is subject to the Terms of Use.
Sort by: rss
9531 results
Matthew Manela
This sample shows how to convert from HTML to RTF and from RTF to HTML. It makes use of the WPF RichTextBox to convert to XAML first and then to RTF or HTML.
WPF
Featured
C#
Kemp Brown - Microsoft
This is the complete sample of the Picture Viewer tutorial, which loads a picture from a file and displays it in a window.
(10)
Updated 10/26/2013
Released 10/26/2013
44,285 Downloads
Rick_Anderson - Microsoft
Please see the complete tutorial here.The following text is just pasted here to meet the minimum text requirements. Please follow the links above where the tutorial is maintained and rich comments are found.DescriptionHow does this sample solve the problem?The following text is j
(12)
Updated 5/20/2014
Released 5/20/2014
22,851 Downloads
C#
Migrated Galleries Content - Microsoft
Simple calculator - Demonstrates the concepts and syntax of the Managed Extensibility Framework (MEF)
(6)
Updated 3/7/2011
Released 3/7/2011
24,734 Downloads
Official Windows platform sample

Official Windows platform sample MSFT

Official Windows platform samples are developed and tested by the Windows platform team to ensure that you have a great experience.

View samples
- Microsoft
This sample demonstrates how to use the MediaCapture API to capture video, audio, and pictures from a capture device, such as a webcam.
(26)
Updated 4/2/2014
Released 9/14/2011
89,396 Downloads
razorx83
How To Create Webcam Capture
(9)
Updated 7/20/2011
Released 7/12/2011
42,993 Downloads
maruthi pallamalli
Interface is a type similar to class and its represent contract between objects and its user. In this sample we will learn how to implement nested interface with example.Declaration of Interfaces should be  another one from the code snippet shown different type of declarations. D
C#
(2)
Updated 2/3/2016
Released 2/3/2016
4,827 Downloads
C#
maruthi pallamalli
Usually in wcf, We have a validation problem for task methods. By using this sample code we can give validations to Task methods at service level.We need one nuget package service CustomValidationsIntegrationWCF  instead of Enterprise Integration validation wcf. DescriptionEnterp
(2)
Updated 12/3/2015
Released 12/3/2015
4,797 Downloads
C#
maruthi pallamalli
In General singleton pattern We tested Instances with classname.methodname like SampleClass sampleclass=SampleClass.TestMethod();But why can't we use SampleClass sampleclass=SampleClass._Instance;and we tested Instance for null. So this example we will try to eliminate that kind
C#
(3)
Updated 12/17/2015
Released 12/17/2015
4,730 Downloads
C#
Official Windows platform sample

Official Windows platform sample MSFT

Official Windows platform samples are developed and tested by the Windows platform team to ensure that you have a great experience.

View samples
- Microsoft
Demonstrates use of the Bluetooth Generic Attribute Profile (Gatt) Windows Runtime API to interact with a Bluetooth Gatt device, which contains a Heart Rate Service.
(7)
Updated 9/3/2014
Released 6/26/2013
22,378 Downloads
Chuck Walbourn - MSFT
The D3D11InstallHelper sample is designed to simplify detection of the Direct3D 11 API, automatically install the system update if applicable to an end-user's computer, and to provide appropriate messages to the end-user on manual procedure if a newer Service Pack is required.
(3)
Updated 10/12/2015
Released 5/22/2012
66,558 Downloads
C++

Couldn't find the sample you were looking for?

51 - 60 of 9531 Items