C#

Pan, Zoom & Rotate Images With WPF using C#

Posted by Joel 24 September, 2009 (3) Comment

WPF is a awesome tool for the person who wants his software to look good. So many effects as well as animations can be applied in WPF. Today I’m going to talk about how to have  UI which will allow a user to rotate zoom and pan an image within a WPF application.

Now lets get started by creating a wpf application, now your newly created application will have a window and a grid inside the window. See the below XAML

<window x:Class="PanandZoom.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="600" Width="800">
    <grid>
    </grid>
</window>

Inside the gird we created lets create two rows, one row will hold the slider for the rotation and the other row will hold the image which we will be playing with add the following snippet inside the <grid></grid> in the XAML.

Read the rest of this entry

Categories : C#, Coding, WPF Tags : , , , , ,

Sending Mail Using C#

Posted by Joel 14 September, 2009 (0) Comment

Sending mail in PHP is pretty easy, all you need to do is check if your Linux server (if that’s what you are running) has email capability. However in .net you need SMTP server host to send mails, so here is a easy tutorial as well as source code to send mails using C#.

Prerequisites

To test your code properly, you must have an SMTP host, either running in your local machine or a remote server.

Lets Get Started

So lets get started, first of all lets look at the namespaces we will be using, please note that we will be using System.Net.Mail and not System.Web.Mail, System.Web.Mail is an outdated class. So here is the list of namespaces we will be using.

using System;
using System.Collections.Generic;
using System.Web;
using System.Net.Mail;
using System.Text;
using System.Collections;

Read the rest of this entry

Categories : C#, Coding Tags : , ,