Click here to Skip to main content
12,293,515 members (63,109 online)
Click here to Skip to main content

Tagged as


201 bookmarked

WPF Tutorial : Layout-Panels-Containers & Layout Transformation

, 21 Aug 2011 CPOL
This article describes the basics of WPF application, how you can deal with layout, placements of controls and position.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace LayoutDemo
    /// <summary>
    /// Interaction logic for wndInkCanvas.xaml
    /// </summary>
    public partial class wndInkCanvas : Window
        public wndInkCanvas()

        private void Pen_Checked(object sender, RoutedEventArgs e)
            icBox.EditingMode = InkCanvasEditingMode.Ink;

        private void Erase_Checked(object sender, RoutedEventArgs e)
            icBox.EditingMode = InkCanvasEditingMode.EraseByPoint;

        private void EraseByStroke_Checked(object sender, RoutedEventArgs e)
            icBox.EditingMode = InkCanvasEditingMode.EraseByStroke;

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Abhishek Sur
India India
Did you like his post?

Oh, lets go a bit further to know him better.
Visit his Website : to know more about Abhishek.

Abhishek also authored a book on .NET 4.5 Features and recommends you to read it, you will learn a lot from it.

Basically he is from India, who loves to explore the .NET world. He loves to code and in his leisure you always find him talking about technical stuffs.

Presently he is working in WPF, a new foundation to UI development, but mostly he likes to work on architecture and business classes. ASP.NET is one of his strength as well.
Have any problem? Write to him in his Forum.

You can also mail him directly to

Want a Coder like him for your project?
Drop him a mail to

Visit His Blog

Dotnet Tricks and Tips

Dont forget to vote or share your comments about his Writing

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160518.1 | Last Updated 22 Aug 2011
Article Copyright 2010 by Abhishek Sur
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid