Home > WPF > Set an Icon for WPF Application

Set an Icon for WPF Application

You can set an Icon for your WPF application. First you have to create 24 x 24 .ico file and put inside the application root directory.

Best software to create and manipulate icon file is IconXP. you can download from here http://www.aha-soft.com/iconxp/ try it free(1 month).

To set an icon for WPF window, see the xaml shown below.

<Window x:Class=”MyApp.MainWindow”
xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation&#8221;
xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml&#8221;
Title=”MainWindow” Height=”300″ Width=”350″ Icon=”icon.ico”>

..

</Window>

 

Advertisements
Categories: WPF Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: