background preloader

C# tutorial

Facebook Twitter

C# Tutorial: Create a Glossy Button [Custom Controls] ListView in C# ListView in C# A ListView control provides an interface to display a list of items using different views including text, small images, and large images.

ListView in C#

Visual Studio 2012 Keyboard Shortcuts. Here are some extremely helpful keyboard shortcut keys for Visual Studio 2012.

Visual Studio 2012 Keyboard Shortcuts

You probably know most, but some you won’t know. For instance, did you know that Ctrl+. is the same as Sift+Alt+F10? These shortcuts assume you have you environment configured for C# development. If you have another configuration, like web, these shortcuts may not work. To use, hold down the control key and hit the key combination. Go to Definition (F12) Navigate to the definition of the method or variable. Find all References (Shift + F12) Update References/ Add Using Statement (Ctrl +. or Shift +Alt +F10) I’m referring to the underline that appears under a variable to perform an action like add a using statement, or refacter a method or class name.

List Members (Ctrl +J or Ctrl +K, L) Displays the autocomplete list for classes, methods, or properties. A Detailed Data Binding Tutorial. Download source code - 29.8 KB (This is a Visual Studio 2008 project.

A Detailed Data Binding Tutorial

It contains two "Master-Detail" samples from this article.) Introduction The documentation for Windows Forms data binding is pretty sparse. How does it work, exactly? I believe "data binding" has traditionally referred to automatic synchronization between controls and database rows or tables. DataGrid in WPF. This article shows you how to create and use a DataGrid control in WPF and XAML.

DataGrid in WPF

Note: This article is written using Visual Studio 2010 and .NET Framework 4.0. Introduction DataGrid element represents WPF DataGrid control in XAML. When you drag and drop a DataGrid control from Toolbox to your designer, position the control, this action adds following code to XAML. The Width and Height properties represent the width and the height of a DataGrid. Listing 1. WPF DataGrid Practical Examples. Download source code - 65.44 KB Contents Introduction A DataGrid is a user interface component for displaying tabular data to the user, typically providing sorting and editing functionality, among others.

WPF DataGrid Practical Examples

DataGrids have been the work-horse of various frameworks such as ASP.NET (GridView) and Windows Forms (DataGridView). However, DataGrids in WPF are rather conspicuous in their absence! Fortunately, the absence of this control has not hampered the popularity of WPF. Eventually, in August 2008, Microsoft released its DataGrid CTP (Community Technology Preview - a public beta) to CodePlex to coincide with the release of the .NET Framework 3.5 SP1 and Visual Studio 2008 SP1.

More recently, on October 22 2008, DataGrid v1 was released. Article Overview Currently, there is a lack of documentation and examples demonstrating common DataGrid usage scenarios (which is to be expected, as it is an out-of-band release). I cannot, of course, cover everything. Installing the WPF Toolkit Hide Copy Code. GridView in WPF. If you are looking for a GridView control in WPF, you will be disappointed.

GridView in WPF

WPF does not have a GridView control. But the good news is you can achieve GridView like functionality with a ListView control available in WPF. If you have not used a ListView control in WPF, I recommend you read my ListView in WPF article before this article. The View property is used to provide a GridView layout and design in a ListView control. The View property of ListView is a type of ViewBase class that supports two view types - GridView and a custom view.

The following code snippet sets the View property of a ListView to GridView mode. Getting Started with Windows Presentation Foundation. This walkthrough provides an introduction to the development of a Windows Presentation Foundation (WPF) application that includes the elements that are common to most WPF applications: Extensible Application Markup Language (XAML) markup, code-behind, application definitions, controls, layout, data binding, and styles.

Getting Started with Windows Presentation Foundation

This walkthrough guides you through the development of a simple WPF application using the following steps. Defining XAML to design the appearance of the application's user interface (UI).Writing code to build the application's behavior.Creating an application definition to manage the application.Adding controls and creating the layout to compose the application UI.Creating styles to create a consistent appearance throughout an application's UI.Binding the UI to data to both populate the UI from data and keep the data and UI synchronized.

You need the following components to complete this walkthrough: Visual Studio 2010 In this section, you build and run the application. Mastering Debugging in Visual Studio 2010 - A Beginner's Guide. Table of Contents Introduction In the software development life cycle, testing and defect fixing take more time than actually code writing.

Mastering Debugging in Visual Studio 2010 - A Beginner's Guide

In general, debugging is a process of finding out defects in the program and fixing them. Defect fixing comes after the debugging, or you can say they are co-related. When you have some defects in your code, first of all you need to identify the root cause of the defect, which is called the debugging. Now how to debug the code? .net - How can I read all files from directory c# C# Tutorials, Windows Forms Tutorials, GDI+ Tutiroals, .NET Tutorials. C# School - Multithreading - Lesson #14 - Page 1. Tier One: Windows Development.