- In a Nutshell
- Task List
- Solutions, Projects and Stuff
- Solution And Project Properties
- Add an Icon
- 1 Set the Application Icon Property
- 2 Build the Application
- 3 Set the Window Property
- Did it Work?
- One More Time...
- Take Control
- Arranging Windows
- More Than Editing...
- List Members
- Parameter Information
- Road Maps
- Review
3 Set the Window Property
A If necessary, double-click MainWindow.xaml in the Solution Explorer to open the WPF Designer. In the Properties window, find the Icon property, select it, and then click the ellipsis button.
B After you click the ellipsis in the Properties window, Visual Studio will display the Choose Image dialog. Your new icon will be displayed, but there might not be a thumbnail. It’s okay; Visual Studio just hasn’t caught up with us.
Click on your icon, and then click OK to set the property.
After you click the OK button, Visual Studio will set the property to a long value that begins with pack//application.../. That’s just WPF-Speak for “look in the application file”, and we’ll figure out how it all works later when we examine WPF Resources.